diff options
-rwxr-xr-x | t/t7810-grep.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 1797f632a3..fecee602c1 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -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 ) ' |