Skip to content

Commit abacefe

Browse files
committed
Merge branch 'tb/t5318-cleanup'
Code cleanup. * tb/t5318-cleanup: t5318: test that '--stdin-commits' respects '--[no-]progress' t5318: use 'test_must_be_empty'
2 parents 0cd0afc + 94fbd91 commit abacefe

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

t/t5318-commit-graph.sh

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ test_expect_success 'Add more commits' '
147147
test_expect_success 'commit-graph write progress off for redirected stderr' '
148148
cd "$TRASH_DIRECTORY/full" &&
149149
git commit-graph write 2>err &&
150-
test_line_count = 0 err
150+
test_must_be_empty err
151151
'
152152

153153
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' '
159159
test_expect_success 'commit-graph write with the --no-progress option' '
160160
cd "$TRASH_DIRECTORY/full" &&
161161
git commit-graph write --no-progress 2>err &&
162-
test_line_count = 0 err
162+
test_must_be_empty err
163+
'
164+
165+
test_expect_success 'commit-graph write --stdin-commits progress off for redirected stderr' '
166+
cd "$TRASH_DIRECTORY/full" &&
167+
git rev-parse commits/5 >in &&
168+
git commit-graph write --stdin-commits <in 2>err &&
169+
test_must_be_empty err
170+
'
171+
172+
test_expect_success 'commit-graph write --stdin-commits force progress on for stderr' '
173+
cd "$TRASH_DIRECTORY/full" &&
174+
git rev-parse commits/5 >in &&
175+
GIT_PROGRESS_DELAY=0 git commit-graph write --stdin-commits --progress <in 2>err &&
176+
test_i18ngrep "Collecting commits from input" err
177+
'
178+
179+
test_expect_success 'commit-graph write --stdin-commits with the --no-progress option' '
180+
cd "$TRASH_DIRECTORY/full" &&
181+
git rev-parse commits/5 >in &&
182+
git commit-graph write --stdin-commits --no-progress <in 2>err &&
183+
test_must_be_empty err
163184
'
164185

165186
test_expect_success 'commit-graph verify progress off for redirected stderr' '
166187
cd "$TRASH_DIRECTORY/full" &&
167188
git commit-graph verify 2>err &&
168-
test_line_count = 0 err
189+
test_must_be_empty err
169190
'
170191

171192
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' '
177198
test_expect_success 'commit-graph verify with the --no-progress option' '
178199
cd "$TRASH_DIRECTORY/full" &&
179200
git commit-graph verify --no-progress 2>err &&
180-
test_line_count = 0 err
201+
test_must_be_empty err
181202
'
182203

183204
# Current graph structure:

0 commit comments

Comments
 (0)