Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
test_must_be_empty: make sure the file exists, not just empty
[gitweb.git]
/
t
/
test-lib-functions.sh
diff --git
a/t/test-lib-functions.sh
b/t/test-lib-functions.sh
index 1701fe2a06057530d845b91b4fd4cce99b4521a2..d2eaf5ab67269730fd293e2032100cdb34283225 100644
(file)
--- a/
t/test-lib-functions.sh
+++ b/
t/test-lib-functions.sh
@@
-718,7
+718,11
@@
verbose () {
# otherwise.
test_must_be_empty () {
- if test -s "$1"
+ if ! test -f "$1"
+ then
+ echo "'$1' is missing"
+ return 1
+ elif test -s "$1"
then
echo "'$1' is not empty, it contains:"
cat "$1"