test: trivial cleanups
[gitweb.git] / t / t6012-rev-list-simplify.sh
index 8e2ff13423ba01095404ec49232760bc66c68978..dd6dc844e787549ab7622fb4fbec4f89b52e22ab 100755 (executable)
@@ -77,14 +77,16 @@ test_expect_success setup '
 
 FMT='tformat:%P        %H | %s'
 
-check_result () {
+check_outcome () {
+       outcome=$1
+       shift
        for c in $1
        do
                echo "$c"
        done >expect &&
        shift &&
        param="$*" &&
-       test_expect_success "log $param" '
+       test_expect_$outcome "log $param" '
                git log --pretty="$FMT" --parents $param |
                unnote >actual &&
                sed -e "s/^.*   \([^ ]*\) .*/\1/" >check <actual &&
@@ -95,11 +97,15 @@ check_result () {
        '
 }
 
+check_result () {
+       check_outcome success "$@"
+}
+
 check_result 'L K J I H G F E D C B A' --full-history
 check_result 'K I H E C B A' --full-history -- file
 check_result 'K I H E C B A' --full-history --topo-order -- file
 check_result 'K I H E C B A' --full-history --date-order -- file
-check_result 'I E C B A' --simplify-merges -- file
+check_outcome failure 'I E C B A' --simplify-merges -- file
 check_result 'I B A' -- file
 check_result 'I B A' --topo-order -- file
 check_result 'H' --first-parent -- another-file