зеркало из https://github.com/microsoft/git.git
t7810: use test_expect_code() instead of hand-rolled comparison
This test manually checks the exit code of git-grep for a particular value. In doing so, it intentionally breaks the &&-chain. Modernize the test by taking advantage of test_expect_code() and a normal &&-chain. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
adc73318fe
Коммит
d964def526
|
@ -845,10 +845,9 @@ test_expect_success 'grep from a subdirectory to search wider area (1)' '
|
|||
test_expect_success 'grep from a subdirectory to search wider area (2)' '
|
||||
mkdir -p s &&
|
||||
(
|
||||
cd s || exit 1
|
||||
( git grep xxyyzz .. >out ; echo $? >status )
|
||||
! test -s out &&
|
||||
test 1 = $(cat status)
|
||||
cd s &&
|
||||
test_expect_code 1 git grep xxyyzz .. >out &&
|
||||
! test -s out
|
||||
)
|
||||
'
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче