Merge branch 'tb/t5318-cleanup'

Code cleanup.

* tb/t5318-cleanup:
  t5318: test that '--stdin-commits' respects '--[no-]progress'
  t5318: use 'test_must_be_empty'
This commit is contained in:
Junio C Hamano 2020-06-17 21:54:00 -07:00
commit abacefe865

View File

@ -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: