From: Junio C Hamano <gitster@pobox•com>
To: Jeremiah Mahler <jmmahler@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH v6] format-patch --signature-file <file>
Date: Wed, 21 May 2014 14:58:42 -0700 [thread overview]
Message-ID: <xmqqoayqoktp.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140521215059.GB13956@hudson.localdomain> (Jeremiah Mahler's message of "Wed, 21 May 2014 14:50:59 -0700")
Jeremiah Mahler <jmmahler@gmail•com> writes:
> On Wed, May 21, 2014 at 02:13:06PM -0700, Junio C Hamano wrote:
>> Jeremiah Mahler <jmmahler@gmail•com> writes:
>>
> ...
>> > ! grep "^-- \$" output
> ...
>>
>> We have been trying not to do the above in recent test updates. It
>> would be nice if this set-up did not have to be outside of the usual
>> test_expect_success structure.
>>
>
> Jeff caught those "! grep" instances in my patch.
Hmm, I didn't mean that one, and I do not offhand what is wrong
about "! grep" that says "output should not contain this string".
The problem is a "cat" you added outside test_expect_*; the recent
push is to have as little executable outside them, especially the
"set-up" code to prepare for the real tests.
i.e. we have been trying to write new tests (and convert old ones)
like this:
test_expect_success 'I test such and such ' '
cat >input-for-test <<-\EOF &&
here comes input
EOF
git command-to-be-tested <input-for-test >actual &&
cat >expected <<-\EOF &&
here comes expected output
EOF
test_cmp expected actual
'
not like this:
cat >input-for-test <<-\EOF &&
here comes input
EOF
test_expect_success 'I test such and such ' '
git command-to-be-tested <input-for-test >actual &&
cat >expected <<-\EOF &&
here comes expected output
EOF
test_cmp expected actual
'
next prev parent reply other threads:[~2014-05-21 21:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 1:02 [PATCH v6] format-patch --signature-file <file> Jeremiah Mahler
2014-05-21 1:02 ` Jeremiah Mahler
2014-05-21 21:13 ` Junio C Hamano
2014-05-21 21:24 ` Junio C Hamano
2014-05-21 21:32 ` Jeremiah Mahler
2014-05-21 21:50 ` Jeremiah Mahler
2014-05-21 21:58 ` Junio C Hamano [this message]
2014-05-21 22:02 ` Jeff King
2014-05-21 22:15 ` Junio C Hamano
2014-05-21 22:27 ` Jeremiah Mahler
2014-05-21 22:48 ` Junio C Hamano
2014-05-21 22:12 ` Jeremiah Mahler
2014-05-21 22:37 ` Junio C Hamano
2014-05-21 23:18 ` Jeremiah Mahler
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=xmqqoayqoktp.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jmmahler@gmail$(echo .)com \
/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