From 0155a64e88ad65408f9ca6d988156aec0898863d Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sun, 31 Oct 2010 02:36:57 -0500 Subject: [PATCH] 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 --- t/t3301-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ' -- 2.26.2