summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-06-17 21:54:00 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-06-17 21:54:01 -0700
commitabacefe865ea02655b17ba6fad860788c30e7fed (patch)
treedd79299ad158f74c4c3b0b504986ccdc2dc3f573 /t
parentMerge branch 'jk/diff-memuse-optim-with-stat-unmatch' (diff)
parentt5318: test that '--stdin-commits' respects '--[no-]progress' (diff)
downloadtgif-abacefe865ea02655b17ba6fad860788c30e7fed.tar.xz
Merge branch 'tb/t5318-cleanup'
Code cleanup. * tb/t5318-cleanup: t5318: test that '--stdin-commits' respects '--[no-]progress' t5318: use 'test_must_be_empty'
Diffstat (limited to 't')
-rwxr-xr-xt/t5318-commit-graph.sh29
1 files changed, 25 insertions, 4 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index a79c624875..26f332d6a3 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -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: