Skip to content

Commit 6334c5f

Browse files
ttaylorrgitster
authored andcommitted
t5318: use 'test_must_be_empty'
A handful of tests in t5318 use 'test_line_count = 0 ...' to make sure that some command does not write any output. While correct, it is more idiomatic to use 'test_must_be_empty' instead. Switch the former invocations to use the latter instead. Signed-off-by: Taylor Blau <[email protected]> Acked-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b3d7a52 commit 6334c5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t5318-commit-graph.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ test_expect_success 'Add more commits' '
140140
test_expect_success 'commit-graph write progress off for redirected stderr' '
141141
cd "$TRASH_DIRECTORY/full" &&
142142
git commit-graph write 2>err &&
143-
test_line_count = 0 err
143+
test_must_be_empty err
144144
'
145145

146146
test_expect_success 'commit-graph write force progress on for stderr' '
@@ -152,13 +152,13 @@ test_expect_success 'commit-graph write force progress on for stderr' '
152152
test_expect_success 'commit-graph write with the --no-progress option' '
153153
cd "$TRASH_DIRECTORY/full" &&
154154
git commit-graph write --no-progress 2>err &&
155-
test_line_count = 0 err
155+
test_must_be_empty err
156156
'
157157

158158
test_expect_success 'commit-graph verify progress off for redirected stderr' '
159159
cd "$TRASH_DIRECTORY/full" &&
160160
git commit-graph verify 2>err &&
161-
test_line_count = 0 err
161+
test_must_be_empty err
162162
'
163163

164164
test_expect_success 'commit-graph verify force progress on for stderr' '
@@ -170,7 +170,7 @@ test_expect_success 'commit-graph verify force progress on for stderr' '
170170
test_expect_success 'commit-graph verify with the --no-progress option' '
171171
cd "$TRASH_DIRECTORY/full" &&
172172
git commit-graph verify --no-progress 2>err &&
173-
test_line_count = 0 err
173+
test_must_be_empty err
174174
'
175175

176176
# Current graph structure:

0 commit comments

Comments
 (0)