From ea42ae0fe7a4f8715d9b7b51272d9200ea0844c6 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Sep 15 2020 10:46:17 +0000 Subject: Merge pull request #61 from alexiri/png We may not have any png files at all --- diff --git a/tests/p_file/02_file_mime_image.sh b/tests/p_file/02_file_mime_image.sh index 3a2f37d..0d0c65c 100755 --- a/tests/p_file/02_file_mime_image.sh +++ b/tests/p_file/02_file_mime_image.sh @@ -7,6 +7,11 @@ t_Log "Running $0 - checking if file can recognize image mime file type " pngfile="$(find /usr/share/ -name '*.png' -print -quit)" +if [ -z "$pngfile" ];then + t_Log "No png file found => SKIP" + exit 0 +fi + file $pngfile -i | grep -q 'image/png' t_CheckExitStatus $?