threads / patch / 31612

patchImprove legibility of test_expect_code output

Subject: [PATCH] Improve legibility of test_expect_code output

## tl;dr

9 messages between Sep 19, 2012 and Sep 20, 2012. Diffs are folded; open one to read it.

replies: 8people: 2as markdown or json

Adam Spiers· Sep 19, 2012, 22:38 UTC · lore
---
 t/test-lib-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 t/test-lib-functions.sh
Show changes to t/test-lib-functions.sh +1 −1
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
old mode 100644
new mode 100755
index 8889ba5..e022e73
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -562,7 +562,7 @@ test_expect_code () {
 		return 0
 	fi
 
-	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
+	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code from: $*"
 	return 1
 }
 
-- 
1.7.12.147.g6d168f4
Junio C Hamano· Sep 20, 2012, 00:06 UTC · re: Adam Spiers · lore

Re: [PATCH] Improve legibility of test_expect_code output

Adam Spiers <git@adamspiers.org> writes:
> ---
No explanation why this is a good idea, nor sign-off?
Show 18 quoted lines
>  t/test-lib-functions.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>  mode change 100644 => 100755 t/test-lib-functions.sh
>
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> old mode 100644
> new mode 100755
> index 8889ba5..e022e73
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -562,7 +562,7 @@ test_expect_code () {
>  		return 0
>  	fi
>  
> -	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
> +	echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code from: $*"
>  	return 1
>  }
Adam Spiers· Sep 20, 2012, 00:25 UTC · re: Junio C Hamano · lore

Re: [PATCH] Improve legibility of test_expect_code output

On Thu, Sep 20, 2012 at 1:06 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> Adam Spiers <git@adamspiers.org> writes:
>
>> ---
>
> No explanation why this is a good idea, nor sign-off?
I realised I forgot the sign-off seconds after sending :-(
Isn't it completely self-explanatory? e.g.
    test_expect_code: command exited with 0, we wanted 128 git foo bar
clearly makes more sense than
    test_expect_code: command exited with 0, we wanted 128 from: git foo bar
Junio C Hamano· Sep 20, 2012, 00:35 UTC · re: Adam Spiers · lore

Re: [PATCH] Improve legibility of test_expect_code output

Adam Spiers <git@adamspiers.org> writes:
Show 16 quoted lines
> On Thu, Sep 20, 2012 at 1:06 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Adam Spiers <git@adamspiers.org> writes:
>>
>>> ---
>>
>> No explanation why this is a good idea, nor sign-off?
>
> I realised I forgot the sign-off seconds after sending :-(
>
> Isn't it completely self-explanatory? e.g.
>
>     test_expect_code: command exited with 0, we wanted 128 git foo bar
>
> clearly makes more sense than
>
>     test_expect_code: command exited with 0, we wanted 128 from: git foo bar

If it were "..., we wanted 128 from 'git foo bar'", then I would, but otherwise, not really.

Adam Spiers· Sep 20, 2012, 00:48 UTC · re: Junio C Hamano · lore

Re: [PATCH] Improve legibility of test_expect_code output

On Thu, Sep 20, 2012 at 1:35 AM, Junio C Hamano <gitster@pobox.com> wrote:
> If it were "..., we wanted 128 from 'git foo bar'", then I would,
> but otherwise, not really.
That's fine by me.  Both are better than the status quo.
Junio C Hamano· Sep 20, 2012, 16:50 UTC · re: Adam Spiers · lore

Re: [PATCH] Improve legibility of test_expect_code output

Adam Spiers <git@adamspiers.org> writes:
Show 16 quoted lines
> On Thu, Sep 20, 2012 at 1:06 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Adam Spiers <git@adamspiers.org> writes:
>>
>>> ---
>>
>> No explanation why this is a good idea, nor sign-off?
>
> I realised I forgot the sign-off seconds after sending :-(
>
> Isn't it completely self-explanatory? e.g.
>
>     test_expect_code: command exited with 0, we wanted 128 git foo bar
>
> clearly makes more sense than
>
>     test_expect_code: command exited with 0, we wanted 128 from: git foo bar
test_expect_code: command exited with 0, we wanted 128: git foo bar
would be shorter and equally legible, I would think.

In any case, the proposed commit log message should have explained these differences in the first place so that I or others do not have to ask.

Do you want this queued on top of your other series, or as an independent change?

Adam Spiers· Sep 20, 2012, 16:57 UTC · re: Junio C Hamano · lore

Re: [PATCH] Improve legibility of test_expect_code output

On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Do you want this queued on top of your other series, or as an
> independent change?
Independent please.
Junio C Hamano· Sep 20, 2012, 17:45 UTC · re: Adam Spiers · lore

Re: [PATCH] Improve legibility of test_expect_code output

Adam Spiers <git@adamspiers.org> writes:
Show 5 quoted lines
> On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Do you want this queued on top of your other series, or as an
>> independent change?
>
> Independent please.
With a sign-off?
Adam Spiers· Sep 20, 2012, 18:05 UTC · re: Junio C Hamano · lore

Re: [PATCH] Improve legibility of test_expect_code output

On Thu, Sep 20, 2012 at 6:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Adam Spiers <git@adamspiers.org> writes:
>> On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Do you want this queued on top of your other series, or as an
>>> independent change?
>>
>> Independent please.
>
> With a sign-off?
Yep.

← back to recent threads