t5318-commit-graph: use 'test_expect_code'
[gitweb.git] / t / t5318-commit-graph.sh
index 5267c4be20e709bb1632c5b9786ffdb418bcb5c9..4391007f4c1c60fe7d66249a8190c6ea0f317eb8 100755 (executable)
@@ -20,14 +20,13 @@ test_expect_success 'verify graph with no graph file' '
 test_expect_success 'write graph with no packs' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph write --object-dir . &&
-       test_path_is_file info/commit-graph
+       test_path_is_missing info/commit-graph
 '
 
 test_expect_success 'close with correct error on bad input' '
        cd "$TRASH_DIRECTORY/full" &&
        echo doesnotexist >in &&
-       { git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
-       test "$ret" = 1 &&
+       test_expect_code 1 git commit-graph write --stdin-packs <in 2>stderr &&
        test_i18ngrep "error adding pack" stderr
 '