tests: validate file existence of file to test before tests
[nit.git] / tests / tests.sh
index 5b32a7d..78188fd 100755 (executable)
@@ -128,6 +128,10 @@ ok=""
 nok=""
 
 for ii in "$@"; do
+       if [ ! -f $ii ]; then
+               echo "File '$ii' does not exist."
+               continue
+       fi
        for alt in "" `sed -n 's/.*#!*\(alt[0-9]*\)#.*/\1/p' "$ii" | sort -u`; do
                f=`basename "$ii" .nit`
                d=`dirname "$ii"`