t7060: add test for status --branch on a detached HEAD
[gitweb.git] / t / t4026-color.sh
index 4d20feacfe8b7688c9bfefc43d60ba4f1a6c2cfc..2b32c4fbe67d9dc0a43fc7858ddd3ac400b6171f 100755 (executable)
@@ -111,9 +111,9 @@ test_expect_success 'unknown color slots are ignored (branch)' '
 '
 
 test_expect_success 'unknown color slots are ignored (status)' '
-       git config color.status.nosuchslotwilleverbedefined white || exit
-       git status
-       case $? in 0|1) : ok ;; *) false ;; esac
+       git config color.status.nosuchslotwilleverbedefined white &&
+       { git status; ret=$?; } &&
+       case $ret in 0|1) : ok ;; *) false ;; esac
 '
 
 test_done