Skip to content

Commit 2e64650

Browse files
committed
Merge branch 'jc/test-must-be-empty' into next
Test helper update. * jc/test-must-be-empty: test_must_be_empty: simplify file existence check
2 parents 0251068 + 9eb2308 commit 2e64650

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

t/test-lib-functions.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,11 +782,8 @@ verbose () {
782782
# otherwise.
783783

784784
test_must_be_empty () {
785-
if ! test -f "$1"
786-
then
787-
echo "'$1' is missing"
788-
return 1
789-
elif test -s "$1"
785+
test_path_is_file "$1" &&
786+
if test -s "$1"
790787
then
791788
echo "'$1' is not empty, it contains:"
792789
cat "$1"

0 commit comments

Comments
 (0)