On Sun, Jun 09, 2013 at 11:30:01AM -0700, Junio C Hamano wrote:
> -- >8 --
> Subject: [PATCH] test: test_output_must_be_empty helper
>
> There are quite a lot places where an output file is expected to be
> empty, and we fail the test when it is not. The output from running
> the test script wit
On Mon, Jun 10, 2013 at 09:07:06PM +0200, Johannes Sixt wrote:
> Am 10.06.2013 19:27, schrieb SZEDER Gábor:
> > My main motivation is that, like in your example, in the bash prompt
> > tests I only have to check a single line of output, but because of
> > debuggability I always did:
> >
> > echo
SZEDER Gábor writes:
> With such a helper function this could be reduced to a single line:
>
> test_string_equal "(master)" "$(__git_ps1)"
>
> without loss of functionality or debuggability, because in case of a
> failure it would output something like this (bikesheddable, of
> course):
>
> E
Am 10.06.2013 19:27, schrieb SZEDER Gábor:
> My main motivation is that, like in your example, in the bash prompt
> tests I only have to check a single line of output, but because of
> debuggability I always did:
>
> echo "(master)" >expected
> __git_ps1 >actual
> test_cmp expected actual
C
On Mon, Jun 10, 2013 at 08:56:58AM -0700, Junio C Hamano wrote:
> SZEDER Gábor writes:
>
> > On Sun, Jun 09, 2013 at 03:41:54PM -0500, Felipe Contreras wrote:
> >> There
> >> will not be a need for test_string_must_be_empty() just like there's
> >> no need for test_string_cmp().
> >
> > Actually,
On Mon, Jun 10, 2013 at 10:56 AM, Junio C Hamano wrote:
> By the way, test_cmp() is a replacement for the "cmp" command and
> that is why it does not have "file" in its name.
That's an irrelevant implementation detail. But if you want to be
driven the the implementation, call it test_zero().
--
SZEDER Gábor writes:
> On Sun, Jun 09, 2013 at 03:41:54PM -0500, Felipe Contreras wrote:
>> There
>> will not be a need for test_string_must_be_empty() just like there's
>> no need for test_string_cmp().
>
> Actually, if there were a test_string_cmp(), that would be the test
> helper function I u
On Sun, Jun 09, 2013 at 03:41:54PM -0500, Felipe Contreras wrote:
> There
> will not be a need for test_string_must_be_empty() just like there's
> no need for test_string_cmp().
Actually, if there were a test_string_cmp(), that would be the test
helper function I used most often.
--
To unsubscrib
"Philip Oakley" writes:
> While folks do use such simplistic names, given that the patch had
> many call sites, I do think Filipe's short name would quickly become
> the accepted test name and not cause any great difficulties.
OK.
--
To unsubscribe from this list: send the line "unsubscribe git"
From: "Felipe Contreras"
Sent: Sunday, June 09, 2013 8:33 PM
On Sun, Jun 9, 2013 at 2:20 PM, Junio C Hamano
wrote:
Felipe Contreras writes:
On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano
wrote:
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -606,6 +606,18 @@ test_cmp() {
On Sun, Jun 9, 2013 at 3:35 PM, Junio C Hamano wrote:
> Felipe Contreras writes:
>
>> On Sun, Jun 9, 2013 at 2:20 PM, Junio C Hamano wrote:
>>> Felipe Contreras writes:
>>>
On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano wrote:
> --- a/t/test-lib-functions.sh
> +++ b/t/test-li
Felipe Contreras writes:
> On Sun, Jun 9, 2013 at 2:20 PM, Junio C Hamano wrote:
>> Felipe Contreras writes:
>>
>>> On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano wrote:
>>>
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -606,6 +606,18 @@ test_cmp() {
On Sun, Jun 9, 2013 at 2:20 PM, Junio C Hamano wrote:
> Felipe Contreras writes:
>
>> On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano wrote:
>>
>>> --- a/t/test-lib-functions.sh
>>> +++ b/t/test-lib-functions.sh
>>> @@ -606,6 +606,18 @@ test_cmp() {
>>> $GIT_TEST_CMP "$@"
>>> }
>>>
>>> +
Felipe Contreras writes:
> On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano wrote:
>
>> --- a/t/test-lib-functions.sh
>> +++ b/t/test-lib-functions.sh
>> @@ -606,6 +606,18 @@ test_cmp() {
>> $GIT_TEST_CMP "$@"
>> }
>>
>> +# Check if the file expected to be empty is indeed empty, and barfs
On Sun, Jun 9, 2013 at 1:30 PM, Junio C Hamano wrote:
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -606,6 +606,18 @@ test_cmp() {
> $GIT_TEST_CMP "$@"
> }
>
> +# Check if the file expected to be empty is indeed empty, and barfs
> +# otherwise.
> +
> +test_output_m
Duy Nguyen writes:
> On Sat, Jun 8, 2013 at 3:32 AM, Felipe Contreras
> wrote:
>> Let's show the output so it's clear why it failed.
>
> I think you can always look into trash-directory.t3400 and figure why.
> But if you show this, I think you should use test_cmp to make it clear
> what is not w
On Fri, Jun 7, 2013 at 9:44 PM, Duy Nguyen wrote:
> On Sat, Jun 8, 2013 at 3:32 AM, Felipe Contreras
> wrote:
>> Let's show the output so it's clear why it failed.
>
> I think you can always look into trash-directory.t3400 and figure why.
> But if you show this, I think you should use test_cmp to
On Sat, Jun 8, 2013 at 3:32 AM, Felipe Contreras
wrote:
> Let's show the output so it's clear why it failed.
I think you can always look into trash-directory.t3400 and figure why.
But if you show this, I think you should use test_cmp to make it clear
what is not wanted. Something like
: >expecte
18 matches
Mail list logo