]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5318-commit-graph.sh
Merge branch 'tb/t5318-cleanup'
[thirdparty/git.git] / t / t5318-commit-graph.sh
index a79c624875916be83f4cfb86b12156d9571b8d46..26f332d6a31fcecfe8723a6c603ab224462c9ec8 100755 (executable)
@@ -147,7 +147,7 @@ test_expect_success 'Add more commits' '
 test_expect_success 'commit-graph write progress off for redirected stderr' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph write 2>err &&
-       test_line_count = 0 err
+       test_must_be_empty err
 '
 
 test_expect_success 'commit-graph write force progress on for stderr' '
@@ -159,13 +159,34 @@ test_expect_success 'commit-graph write force progress on for stderr' '
 test_expect_success 'commit-graph write with the --no-progress option' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph write --no-progress 2>err &&
-       test_line_count = 0 err
+       test_must_be_empty err
+'
+
+test_expect_success 'commit-graph write --stdin-commits progress off for redirected stderr' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git rev-parse commits/5 >in &&
+       git commit-graph write --stdin-commits <in 2>err &&
+       test_must_be_empty err
+'
+
+test_expect_success 'commit-graph write --stdin-commits force progress on for stderr' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git rev-parse commits/5 >in &&
+       GIT_PROGRESS_DELAY=0 git commit-graph write --stdin-commits --progress <in 2>err &&
+       test_i18ngrep "Collecting commits from input" err
+'
+
+test_expect_success 'commit-graph write --stdin-commits with the --no-progress option' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git rev-parse commits/5 >in &&
+       git commit-graph write --stdin-commits --no-progress <in 2>err &&
+       test_must_be_empty err
 '
 
 test_expect_success 'commit-graph verify progress off for redirected stderr' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph verify 2>err &&
-       test_line_count = 0 err
+       test_must_be_empty err
 '
 
 test_expect_success 'commit-graph verify force progress on for stderr' '
@@ -177,7 +198,7 @@ test_expect_success 'commit-graph verify force progress on for stderr' '
 test_expect_success 'commit-graph verify with the --no-progress option' '
        cd "$TRASH_DIRECTORY/full" &&
        git commit-graph verify --no-progress 2>err &&
-       test_line_count = 0 err
+       test_must_be_empty err
 '
 
 # Current graph structure: