Re: [PATCH v4 3/3] t4113: put executable lines to test_expect_success
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 15, 2023, 00:26 UTC
- Message-ID
- <CAPig+cTCd4kTM5xVpZv7joiXS+QZfLKVprY_1cpjg9T1_N6Pmw@mail.gmail.com>
- In-Reply-To
- <230207.86h6vx51x3.gmgdl@evledraar.gmail.com>
On Tue, Feb 7, 2023 at 3:19 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 27 quoted lines
> On Mon, Feb 06 2023, Shuqi Liang wrote: > > On Mon, Feb 6, 2023 at 5:44 PM Junio C Hamano <gitster@pobox.com> wrote: > >> This creates a "test-patch" file with lines 'a' and 'b' that are > >> common context lines without any whitespace before them, no? The > >> original left the necessary single space in front of them (see the > >> line removed above). > > > > I try to change the code to(left the necessary single space in front > > of 'a' and 'b': > > > > @@ -1,2 +1,3 @@ > > - a > > - b > > + a > > + b > > +c > > EOF > > > > t4113-apply-ending.sh (Wstat: 256 Tests: 0 Failed: 0) > > Result: FAIL. > > > > I'm stumped as to why it's still failing. I've tried searching for > > answers on StackOverflow, but I still can't figure it out. > > But this is almost certainly that you're trying to insert leading > whitespace into a line that's in a <<-EOF here-doc, the "-" part of that > means that your leading whitespace is being stripped.
Almost. The `<<-` operator actually only strips leading TABs; other whitespace following the TABs is left intact.