From: Jonathan Nieder Date: Sun, 31 Oct 2010 07:36:57 +0000 (-0500) Subject: t3301 (notes): use test_expect_code for clarity X-Git-Tag: v1.7.4-rc0~116^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0155a64e88ad65408f9ca6d988156aec0898863d;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 69311713d..7e84ab979 100755 --- a/t/t3301-notes.sh +++ b/t/t3301-notes.sh @@ -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' '