Skip to content

Commit

Permalink
t3301 (notes): use test_expect_code for clarity
Browse files Browse the repository at this point in the history
Use the test_expect_code helper instead of open-coding it.

The main behavior change is to print the command and actual exit
status when the test fails.  More importantly, this would make it
easier to add commands before "git notes show" as part of the
same test assertion if needed.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Nov 9, 2010
1 parent 598f087 commit 0155a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t3301-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test_expect_success 'refusing to edit notes in refs/remotes/' '

# 1 indicates caught gracefully by die, 128 means git-show barked
test_expect_success 'handle empty notes gracefully' '
git notes show ; test 1 = $?
test_expect_code 1 git notes show
'

test_expect_success 'show non-existent notes entry with %N' '
Expand Down

0 comments on commit 0155a64

Please sign in to comment.