diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-06-21 02:01:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-21 02:01:28 -0700 |
commit | c6720cfa49fde6d78b010c088a476d226d161983 (patch) | |
tree | 8d7b0d2181a6c4d10ec5daa05d1186165211a1ea /t | |
parent | 3ba4f3a9fc68ba4c5a0064107e8993c5fc5b684f (diff) | |
download | git-c6720cfa49fde6d78b010c088a476d226d161983.tar.gz |
t3505: fix abuse of test_expect_code
The test wanted to make sure that cherry-pick exits with status 1,
but with the way it was placed after "git checkout master &&" meant
that it could have misjudged success if checkout barfed with the
same failure status.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3505-cherry-pick-empty.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh index 9aaeabd972..e51e505a9f 100755 --- a/t/t3505-cherry-pick-empty.sh +++ b/t/t3505-cherry-pick-empty.sh @@ -17,11 +17,11 @@ test_expect_success setup ' ' -test_expect_code 1 'cherry-pick an empty commit' ' - - git checkout master && - git cherry-pick empty-branch - +test_expect_success 'cherry-pick an empty commit' ' + git checkout master && { + git cherry-pick empty-branch + test "$?" = 1 + } ' test_expect_success 'index lockfile was removed' ' |