All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeremiah Mahler <jmmahler@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v6] format-patch --signature-file <file>
Date: Wed, 21 May 2014 15:48:45 -0700	[thread overview]
Message-ID: <xmqq7g5eoiia.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140521222701.GA24537@hudson.localdomain> (Jeremiah Mahler's message of "Wed, 21 May 2014 15:27:01 -0700")

Jeremiah Mahler <jmmahler@gmail.com> writes:

> On Wed, May 21, 2014 at 03:15:55PM -0700, Junio C Hamano wrote:
>> Jeff King <peff@peff.net> writes:
>> 
>> Yeah, placing it in its own setup may be the best.  There are quite
>> a many set-ups outside the tests in this script from the olden days,
>> so I am OK if left it as-is and have a separate clean-up patch after
>> this topic settles.  I am also OK to add a new one "the new right way"
>> so that a later clean-up patch does not have to change what is added
>> in this step.
>
> I like the idea of limiting the scope of this data so it couldn't
> inadvertently impact later tests.
>
> But placing the same data inside multiple test cases creates duplication.
>
> Is there a way to define data once for a limited set of tests?

That is what Jeff ment by "used across many tests. ... it could go
in its own setup".

In other words,

	test_expect_success 'prepare mail-signature input' '
        	cat >mail-signature <<-\EOF
                ...
                EOF
	'

	test_expect_success 'one test that uses mail-signature' '
        	use mail-signature &&
                test the output
	'

	test_expect_success 'another test that uses mail-signature' '
        	use mail-signature in a different way &&
                test the output
	'

  reply	other threads:[~2014-05-21 22:48 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
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 [this message]
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=xmqq7g5eoiia.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jmmahler@gmail.com \
    --cc=peff@peff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.