From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity
Date: Sun, 14 Nov 2010 11:32:41 -0600 [thread overview]
Message-ID: <20101114173241.GB26459@burratino> (raw)
In-Reply-To: <1289745857-16704-3-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> I used ! instead of test_must_fail so that
> the GIT_EDITOR variable was only used in this command invocation,
(
GIT_EDITOR=cat &&
export GIT_EDITOR &&
test_must_fail ...
)
?
> and
> because the surrounding tests use this style.
Oh, okay. I had the test_must_fail version sitting in my local tree
as part of the unsent part of the &&-chaining series
http://thread.gmane.org/gmane.comp.version-control.git/157903/focus=160419
I am happy to see this fixed sooner.
[...]
> +test_expect_success \
> + 'message in editor has initial comment: first line' '
> # check the first line --- should be empty
> - first=$(sed -e 1q <actual) &&
> - test -z "$first" &&
> + echo >first.expect &&
> + sed -e 1q <actual >first.actual &&
> + test_cmp first.expect first.actual
> +'
> +
> +test_expect_success \
> + 'message in editor has initial comment: remainder' '
> # remove commented lines from the remainder -- should be empty
> - rest=$(sed -e 1d -e '/^#/d' <actual) &&
> - test -z "$rest"
> + >rest.expect
> + sed -e 1d -e '/^#/d' <actual >rest.actual &&
> + test_cmp rest.expect rest.actual
> '
Nice. Note that you've changed the semantics of the test here
(probably for the better): the $() backquoting operator strips
trailing newlines, while your sed expression does not.
I assume you've run the tests and made sure they still pass.
For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
next prev parent reply other threads:[~2010-11-14 17:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-14 14:44 [PATCH 0/4] [PULL] ab/i18n-prereqs, prerequisites for ab/i18n Ævar Arnfjörð Bjarmason
2010-11-14 14:44 ` [PATCH 1/4] Makefile: move "Platform specific tweaks" above LIB_{H,OBJS} Ævar Arnfjörð Bjarmason
2010-11-14 17:23 ` Jonathan Nieder
2010-11-14 17:51 ` Ævar Arnfjörð Bjarmason
2010-11-14 18:51 ` Jonathan Nieder
2010-11-15 16:07 ` Junio C Hamano
2010-11-15 16:11 ` Jonathan Nieder
2010-11-15 16:16 ` Ævar Arnfjörð Bjarmason
2010-11-14 19:12 ` Junio C Hamano
2010-11-14 17:53 ` Jonathan Nieder
2010-11-14 19:08 ` Junio C Hamano
2010-11-14 14:44 ` [PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity Ævar Arnfjörð Bjarmason
2010-11-14 17:32 ` Jonathan Nieder [this message]
2010-11-14 17:57 ` Ævar Arnfjörð Bjarmason
2010-11-14 14:44 ` [PATCH 3/4] tests: use test_cmp instead of piping to diff(1) Ævar Arnfjörð Bjarmason
2010-11-14 17:41 ` Jonathan Nieder
2010-11-14 14:44 ` [PATCH 4/4] builtin: use builtin.h for all builtin commands Ævar Arnfjörð Bjarmason
2010-11-14 15:01 ` Sverre Rabbelier
2010-11-14 15:11 ` Ævar Arnfjörð Bjarmason
2010-11-14 18:55 ` Junio C Hamano
2010-11-14 17:47 ` Jonathan Nieder
2010-11-17 19:54 ` Junio C Hamano
2010-11-17 20:08 ` Ævar Arnfjörð Bjarmason
2010-11-17 20:15 ` Jonathan Nieder
2010-11-14 17:50 ` [PATCH 0/4] [PULL] ab/i18n-prereqs, prerequisites for ab/i18n Jonathan Nieder
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=20101114173241.GB26459@burratino \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).