Skip to content

Commit

Permalink
t5318: use 'test_must_be_empty'
Browse files Browse the repository at this point in the history
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 <me@ttaylorr.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
ttaylorr authored and gitster committed Jun 4, 2020
1 parent b3d7a52 commit 6334c5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/t5318-commit-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,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' '
Expand All @@ -152,13 +152,13 @@ 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 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' '
Expand All @@ -170,7 +170,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:
Expand Down

0 comments on commit 6334c5f

Please sign in to comment.