From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Shuqi Liang <cheskaqiqi@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v4 3/3] t4113: put executable lines to test_expect_success
Date: Tue, 07 Feb 2023 09:05:34 +0100 [thread overview]
Message-ID: <230207.86h6vx51x3.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CAMO4yUGmQ371hLCSTODQct+CzY2mqywfLzZO6fsgqN2=1cWGrw@mail.gmail.com>
On Mon, Feb 06 2023, Shuqi Liang wrote:
> On Mon, Feb 6, 2023 at 5:44 PM Junio C Hamano <gitster@pobox.com> wrote:
>
>> Have you run the resulting test?
>
> My apologies for not testing after V1. That was a major oversight on
> my part. I'll make sure to thoroughly test before each submission to
> avoid any issues with the code in the future.
>
>
>> 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':
>
> diff --git a/t/t4113-apply-ending.sh b/t/t4113-apply-ending.sh
> index ab5ecaab7f..ef61a3187c 100755
> --- a/t/t4113-apply-ending.sh
> +++ b/t/t4113-apply-ending.sh
> @@ -14,8 +14,8 @@ test_expect_success setup '
> --- a/file
> +++ b/file
> @@ -1,2 +1,3 @@
> - a
> - b
> + a
> + b
> +c
> EOF
>
> Here I only show one part ,but I fix two same issue in the V4 patch
> and it still can not pass the test .
> It say :
>
> Test Summary Report
>
> -------------------
>
> t4113-apply-ending.sh (Wstat: 256 Tests: 0 Failed: 0)
>
> Non-zero exit status: 1
>
> Parse errors: No plan found in TAP output
>
> Files=1, Tests=0, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.05 cusr
> 0.02 csys = 0.09 CPU)
>
> 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.
> ----------------
> Thanks,
> Shuqi
The error doesn't tell us much, instead of "make prove" or "prove
<name>" running e.g.:
./t4113-apply-ending.sh -vixd
Gives you better output.
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.
A typical idiom for that is have a marker for the start of line, and
strip the whitespace with "sed". See this for existing examples:
git grep 'sed.*\^.*>.*EOF'
next prev parent reply other threads:[~2023-02-07 8:13 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 22:49 [GSoC][PATCH] t/t4113-apply-ending.sh: Modernize a test script Shuqi Liang
2023-02-01 2:21 ` Andrei Rybak
2023-02-02 17:20 ` cheska fran
2023-02-02 17:18 ` [PATCH v2 0/4] t4113: modernize test style Shuqi Liang
2023-02-02 17:18 ` [PATCH v2 1/4]t4113: replace backslash with single quote Shuqi Liang
2023-02-02 21:00 ` Junio C Hamano
2023-02-05 14:28 ` Shuqi Liang
2023-02-02 17:18 ` [PATCH v2 2/4] t4113:put second creation in own step Shuqi Liang
2023-02-02 17:18 ` [PATCH v2 3/4] t4113: use "<<-" instead of "<<" Shuqi Liang
2023-02-02 21:05 ` Junio C Hamano
2023-02-05 14:38 ` Shuqi Liang
2023-02-02 17:18 ` [PATCH v2 4/4] t4113: indent with tabs Shuqi Liang
2023-02-02 21:10 ` Junio C Hamano
2023-02-05 14:51 ` Shuqi Liang
2023-02-05 14:52 ` [PATCH v3 0/3] modernize style Shuqi Liang
2023-02-05 14:52 ` [PATCH v3 1/3]t4113: modernize a test script Shuqi Liang
2023-02-05 14:52 ` [PATCH v3 2/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-05 14:52 ` [PATCH v3 3/3] t4113: indent with space Shuqi Liang
2023-02-05 20:29 ` Eric Sunshine
2023-02-06 21:17 ` Shuqi Liang
2023-02-06 21:18 ` [PATCH v4 0/3] t4113: modernize style Shuqi Liang
2023-02-06 21:18 ` [PATCH v4 1/3] t4113: modernize test script Shuqi Liang
2023-02-06 21:18 ` [PATCH v4 2/3] t4113: indent with tab Shuqi Liang
2023-02-06 21:18 ` [PATCH v4 3/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-06 21:50 ` Ævar Arnfjörð Bjarmason
2023-02-06 22:44 ` Junio C Hamano
2023-02-06 23:42 ` Shuqi Liang
2023-02-07 8:05 ` Ævar Arnfjörð Bjarmason [this message]
2023-02-07 19:55 ` Shuqi Liang
2023-02-08 5:44 ` Shuqi Liang
2023-02-08 7:44 ` Ævar Arnfjörð Bjarmason
2023-02-10 15:29 ` Shuqi Liang
2023-02-15 0:34 ` Eric Sunshine
2023-02-15 0:26 ` Eric Sunshine
2023-02-14 22:17 ` Shuqi Liang
2023-02-14 22:29 ` Junio C Hamano
2023-02-09 15:44 ` [PATCH v5 0/3] t4113: modernize style Shuqi Liang
2023-02-09 15:44 ` [PATCH v5 1/3] t4113: modernize test script Shuqi Liang
2023-02-09 15:44 ` [PATCH v5 2/3] t4113: indent with tab Shuqi Liang
2023-02-15 0:10 ` Eric Sunshine
2023-02-15 0:18 ` Shuqi Liang
2023-02-09 15:44 ` [PATCH v5 3/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-15 1:09 ` Eric Sunshine
2023-02-15 2:40 ` Shuqi Liang
2023-02-15 2:38 ` [PATCH v6 0/3] t4113: modernize style Shuqi Liang
2023-02-15 2:39 ` Shuqi Liang
2023-02-15 2:39 ` [PATCH v6 1/3] t4113: modernize test script Shuqi Liang
2023-02-15 2:39 ` [PATCH v6 2/3] t4113: indent with tab Shuqi Liang
2023-02-15 2:39 ` [PATCH v6 3/3] t4113: put executable lines to test_expect_success Shuqi Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=230207.86h6vx51x3.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=cheskaqiqi@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).