Re: [PATCH v3 1/2] pretty: Add failing tests: user format ignores i18n.logOutputEncoding setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Alexey Shumkin <zapped@xxxxxxx> writes:
> 
> > diff --git a/t/t4041-diff-submodule-option.sh
> > b/t/t4041-diff-submodule-option.sh ...
> > @@ -48,28 +53,25 @@ head2=$(add_file sm1 foo3)
> >  
> >  test_expect_success 'modified submodule(forward)' "
> 
> As this is [PATCH 1/2], doesn't this patch make this test fail,
> calling for test_expect_failure here (and then later in 2/2 to be
> flipped back to test_expect_success)?
I did not know how is right.
AFAIK, XP way tells to write failing tests and then 
patch/fix the code to pass them.

Here, As I understand now all tests must be successful
The difference is in expectation of failure or success.
Ok. I got it and I will reroll the patches.
> 
> >  	git diff-index -p --submodule=log HEAD >actual &&
> > -	cat >expected <<-EOF &&
> > -Submodule sm1 $head1..$head2:
> > -  > Add foo3
> > -EOF
> > +	printf \"Submodule sm1 $head1..$head2:\n\
> > +  > Add foo3 ($added foo3)\n\
> > +\" > expected &&
> >  	test_cmp expected actual
> >  "
> 
> Hmmm... why printf?  Is it worth to force reviewers wonder what would
> happen if any of these $variables happened to have "%" in them?  Are
> you benefiting from any printf features that you cannot achieve with
> the original cat?
This is a remained from v1 patch code. It is not required now.
I'll fix it. Thanks. 

> This hunk and others throughout your patch that change cat with here
> doc into printf seem to make the tests less legible, at least to me.
> 
> Perhaps like this instead, if the "flushed left" of the original
> looked ugly to your eyes?
No, the reason was not in "flushed left". And, BTW, this code generates
expected output that has predefined format...
> 
> @@ -49,27 +54,25 @@ head2=$(add_file sm1 foo3)
>  test_expect_success 'modified submodule(forward)' "
>  	git diff-index -p --submodule=log HEAD >actual &&
>  	cat >expected <<-EOF &&
> -Submodule sm1 $head1..$head2:
> -  > Add foo3
> -EOF
> +	Submodule sm1 $head1..$head2:
> +	  > Add foo3 ($added foo3)
> +	EOF
>  	test_cmp expected actual
>  "
> 
-- 
С уважением, Алексей Шумкин
Программист компании 1С-Рарус
E-mail: ashu@xxxxxxxx
ICQ: 118001447
Jabber (GoogleTalk): ashu@xxxxxxxx
Skype: crezoff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]