# [PATCH] Improve legibility of test_expect_code output

9 messages from 2012-09-19 to 2012-09-20. Participants: Adam Spiers, Junio C Hamano.
Thread: https://gitlist.dev/t/31612

## Adam Spiers, 2012-09-19 22:38

Subject: [PATCH] Improve legibility of test_expect_code output
Message-ID: <1348094310-11214-1-git-send-email-git@adamspiers.org>
URL: https://gitlist.dev/e/1348094310-11214-1-git-send-email-git%40adamspiers.org

```
---
 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
 }
 
-- 
1.7.12.147.g6d168f4

```

## Junio C Hamano, 2012-09-20 00:06

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <7vboh1eew2.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vboh1eew2.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1348094310-11214-1-git-send-email-git@adamspiers.org>

```
Adam Spiers <git@adamspiers.org> writes:

> ---

No explanation why this is a good idea, nor sign-off?

>  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, 2012-09-20 00:25

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <CAOkDyE-x5NeZX2tpp3C9Kkwb1kPniHptB9ERvtpx2XODufaW=A@mail.gmail.com>
URL: https://gitlist.dev/e/CAOkDyE-x5NeZX2tpp3C9Kkwb1kPniHptB9ERvtpx2XODufaW%3DA%40mail.gmail.com
In-Reply-To: <7vboh1eew2.fsf@alter.siamese.dyndns.org>

```
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

```

## Junio C Hamano, 2012-09-20 00:35

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <7vy5k5cyzg.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy5k5cyzg.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAOkDyE-x5NeZX2tpp3C9Kkwb1kPniHptB9ERvtpx2XODufaW=A@mail.gmail.com>

```
Adam Spiers <git@adamspiers.org> writes:

> 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, 2012-09-20 00:48

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <CAOkDyE95x0_ZVCsrsC8kJWdrzMo8b0nQ19N+QKXy64vQ4N6E+A@mail.gmail.com>
URL: https://gitlist.dev/e/CAOkDyE95x0_ZVCsrsC8kJWdrzMo8b0nQ19N%2BQKXy64vQ4N6E%2BA%40mail.gmail.com
In-Reply-To: <7vy5k5cyzg.fsf@alter.siamese.dyndns.org>

```
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, 2012-09-20 16:50

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <7vtxusbpub.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtxusbpub.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAOkDyE-x5NeZX2tpp3C9Kkwb1kPniHptB9ERvtpx2XODufaW=A@mail.gmail.com>

```
Adam Spiers <git@adamspiers.org> writes:

> 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, 2012-09-20 16:57

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <CAOkDyE9hvBz5wYbj+q=oYTz7zWnP2E9dqtKZ-V=6jBW-FomfbQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAOkDyE9hvBz5wYbj%2Bq%3DoYTz7zWnP2E9dqtKZ-V%3D6jBW-FomfbQ%40mail.gmail.com
In-Reply-To: <7vtxusbpub.fsf@alter.siamese.dyndns.org>

```
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, 2012-09-20 17:45

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <7vipb8bnbo.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vipb8bnbo.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAOkDyE9hvBz5wYbj+q=oYTz7zWnP2E9dqtKZ-V=6jBW-FomfbQ@mail.gmail.com>

```
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?

```

## Adam Spiers, 2012-09-20 18:05

Subject: Re: [PATCH] Improve legibility of test_expect_code output
Message-ID: <CAOkDyE-fi6y5kc9hP9q48kWN0PNmU2CSgWid0EwA9RwQd5fSiA@mail.gmail.com>
URL: https://gitlist.dev/e/CAOkDyE-fi6y5kc9hP9q48kWN0PNmU2CSgWid0EwA9RwQd5fSiA%40mail.gmail.com
In-Reply-To: <7vipb8bnbo.fsf@alter.siamese.dyndns.org>

```
On Thu, Sep 20, 2012 at 6:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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.

```
