t3301 (notes): use test_expect_code for clarity
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>
Jonathan Nieder committed
Oct 31, 2010 at 02:36 UTC
0155a64e88ad65408f9ca6d988156aec0898863d
1 file changed
+1
-1
t/t3301-notes.sh
+1
-1
@@ -52,7 +52,7 @@ test_expect_success 'refusing to edit notes in refs/remotes/' '
52
53
# 1 indicates caught gracefully by die, 128 means git-show barked
54
test_expect_success 'handle empty notes gracefully' '
55
- git notes show ; test 1 = $?
55
+ test_expect_code 1 git notes show
56
'
57
58
test_expect_success 'show non-existent notes entry with %N' '