Skip to content

Commit

Permalink
t3505: fix abuse of test_expect_code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gitster committed Jun 21, 2009
1 parent 3ba4f3a commit c6720cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/t3505-cherry-pick-empty.sh
Expand Up @@ -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' '
Expand Down

0 comments on commit c6720cf

Please sign in to comment.