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 <j6t@kdbg.org> Signed-off-by: Jeff King <peff@peff.net>
Johannes Sixt committed
Nov 19, 2015 at 20:09 UTC
acf3af25fbc8b2323ab210e0b63abcb912bd7def
1 file changed
+3
-5
t/t9300-fast-import.sh
+3
-5
@@ -47,8 +47,6 @@ file5_data='an inline file.
47
file6_data='#!/bin/sh
48
echo "$@"'
49
50
->empty
51
-
50
###
51
### series A
52
###
@@ -2320,12 +2318,12 @@ test_expect_success !MINGW 'R: in-stream cat-blob-fd not respected' '
2318
cat-blob $blob
2319
EOF
2320
test_cmp expect actual.3 &&
2323
- test_cmp empty actual.1 &&
2321
+ test_must_be_empty actual.1 &&
2322
git fast-import 3>actual.3 >actual.1 <<-EOF &&
2323
option cat-blob-fd=3
2324
cat-blob $blob
2325
EOF
2328
- test_cmp empty actual.3 &&
2326
+ test_must_be_empty actual.3 &&
2327
test_cmp expect actual.1
2328
'
2329
@@ -2549,7 +2547,7 @@ EOF
2547
2548
test_expect_success 'R: quiet option results in no stats being output' '
2549
cat input | git fast-import 2> output &&
2552
- test_cmp empty output
2550
+ test_must_be_empty output
2551
'
2552
2553
test_expect_success 'R: feature done means terminating "done" is mandatory' '