Merge branch 'dl/flex-str-cocci'
[gitweb.git] / t / test-lib-functions.sh
index 80402a428f7735a031658a904d4f623f38e43464..681c41ba329a90db8c668fde4640025872f1e622 100644 (file)
@@ -593,6 +593,15 @@ test_dir_is_empty () {
        fi
 }
 
+# Check if the file exists and has a size greater than zero
+test_file_not_empty () {
+       if ! test -s "$1"
+       then
+               echo "'$1' is not a non-empty file."
+               false
+       fi
+}
+
 test_path_is_missing () {
        if test -e "$1"
        then