Jeremiah Mahler <[email protected]> writes:
> On Wed, May 21, 2014 at 03:15:55PM -0700, Junio C Hamano wrote:
>> Jeff King <[email protected]> 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
'
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html