From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in•waw.pl>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, mj@ucw•cz
Subject: Re: [PATCH 1/4] test: modernize style of t4006
Date: Tue, 01 May 2012 21:55:07 +0200 [thread overview]
Message-ID: <4FA03F9B.1020402@in.waw.pl> (raw)
In-Reply-To: <7vzk9r93ym.fsf@alter.siamese.dyndns.org>
On 05/01/2012 08:00 PM, Junio C Hamano wrote:
> Zbigniew Jędrzejewski-Szmek <zbyszek@in•waw.pl> writes:
>
>> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in•waw.pl>
>> ---
>> t/t4006-diff-mode.sh | 32 +++++++++++++++-----------------
>> 1 file changed, 15 insertions(+), 17 deletions(-)
>
> Style update is welcome, but shouldn't the assignment to sed_script
> be done in the second test if it is the only user? If you are going to
> add more tests at the end, then it should be away from the second test to
> make it clear that it is not part of it.
Hi,
$sed_script is indeed only used in that one test. But moving the
assignment inside would complicate the quoting rules (the script is now
quoted with ', but this would have to change inside the test case which
is quoted with ' too). I actually think it's simpler this way.
Thanks,
Zbyszek
>> -sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check
>> -echo ":100644 100755 X X M rezrov" >expected
>> +# $_x40 is defined in test-lib.sh
>> +sed_script='s/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /'
next prev parent reply other threads:[~2012-05-01 19:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 17:10 [PATCH 0/4] report chmod'ed binary files the same as text files Zbigniew Jędrzejewski-Szmek
2012-05-01 17:10 ` [PATCH 1/4] test: modernize style of t4006 Zbigniew Jędrzejewski-Szmek
2012-05-01 18:00 ` Junio C Hamano
2012-05-01 19:55 ` Zbigniew Jędrzejewski-Szmek [this message]
2012-05-01 17:10 ` [PATCH 2/4] tests: check --[short]stat output after chmod Zbigniew Jędrzejewski-Szmek
2012-05-02 7:36 ` Johannes Sixt
2012-05-01 17:10 ` [PATCH 3/4] diff --stat: report chmoded binary files like text files Zbigniew Jędrzejewski-Szmek
2012-05-01 18:27 ` Junio C Hamano
2012-05-01 19:39 ` Zbigniew Jędrzejewski-Szmek
2012-05-01 17:10 ` [PATCH 4/4] diff --stat: do not run diff on indentical files Zbigniew Jędrzejewski-Szmek
2012-05-03 11:45 ` [PATCH 0/4] report chmod'ed binary files the same as text files Martin Mares
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=4FA03F9B.1020402@in.waw.pl \
--to=zbyszek@in$(echo .)waw.pl \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=mj@ucw$(echo .)cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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