commit-graph: add --[no-]progress to write and verify
[git/git.git] / t / t5318-commit-graph.sh
index ab3eccf..df3fed3 100755 (executable)
@@ -124,6 +124,42 @@ test_expect_success 'Add more commits' '
        git repack
 '
 
+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_expect_success 'commit-graph write force progress on for stderr' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git commit-graph write --progress 2>err &&
+       test_file_not_empty err
+'
+
+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_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_expect_success 'commit-graph verify force progress on for stderr' '
+       cd "$TRASH_DIRECTORY/full" &&
+       git commit-graph verify --progress 2>err &&
+       test_file_not_empty err
+'
+
+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
+'
+
 # Current graph structure:
 #
 #   __M3___