Revert "Merge branch 'ps/contains-id-error-message' into next"
[gitweb.git] / t / test-lib-functions.sh
index 42a6781358f85cd43100078e7457e18962f6f07e..6e342804f96fb62ff0b3cfaf667e7efce79dc6af 100644 (file)
@@ -782,7 +782,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"