Skip to content

Commit acf3af2

Browse files
j6tpeff
authored andcommitted
modernize t9300: use test_must_be_empty
Instead of comparing actual output to an empty file, use test_must_be_empty. In addition to the better error message provided by the helper, allocation of an empty file during the setup sequence can be avoided. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent b08d82f commit acf3af2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

t/t9300-fast-import.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ file5_data='an inline file.
4747
file6_data='#!/bin/sh
4848
echo "$@"'
4949

50-
>empty
51-
5250
###
5351
### series A
5452
###
@@ -2320,12 +2318,12 @@ test_expect_success !MINGW 'R: in-stream cat-blob-fd not respected' '
23202318
cat-blob $blob
23212319
EOF
23222320
test_cmp expect actual.3 &&
2323-
test_cmp empty actual.1 &&
2321+
test_must_be_empty actual.1 &&
23242322
git fast-import 3>actual.3 >actual.1 <<-EOF &&
23252323
option cat-blob-fd=3
23262324
cat-blob $blob
23272325
EOF
2328-
test_cmp empty actual.3 &&
2326+
test_must_be_empty actual.3 &&
23292327
test_cmp expect actual.1
23302328
'
23312329

@@ -2549,7 +2547,7 @@ EOF
25492547

25502548
test_expect_success 'R: quiet option results in no stats being output' '
25512549
cat input | git fast-import 2> output &&
2552-
test_cmp empty output
2550+
test_must_be_empty output
25532551
'
25542552

25552553
test_expect_success 'R: feature done means terminating "done" is mandatory' '

0 commit comments

Comments
 (0)