From: Dan F. <dfa...@us...> - 2007-11-29 02:00:52
|
Update of /cvsroot/libexif/libexif-testsuite/tests In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22751/tests Modified Files: check-general-images.in Log Message: Properly handle images that don't contain EXIF tags. Index: check-general-images.in =================================================================== RCS file: /cvsroot/libexif/libexif-testsuite/tests/check-general-images.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- check-general-images.in 22 May 2007 23:48:44 -0000 1.2 +++ check-general-images.in 29 Nov 2007 02:00:45 -0000 1.3 @@ -1,8 +1,9 @@ #!/bin/sh # Execute a number of common sense checks on "real" images # (not specially prepared images) -# -# FIXME: Properly handle images without any EXIF information. + +# |-separated list of test suite images that don't contain EXIF tags +NOEXIFLIST='*canon-powershot-a400-001.jpg' tmpfile="./output.tmp" @@ -13,10 +14,27 @@ total_img=0 for img in @top_srcdir@/src/pel-images/*.jpg @srcdir@/images/*.jpg do test -f "$img" || continue + + # Test images without EXIF tags + case "$img" in + *-thumb* | *no-exif* | $NOEXIFLIST) + echo -n "Attempting list of nonexistent EXIF data from \`${img}'..." + @exif@ "${img}" > "$tmpfile" 2>&1 + s="$?" + if test "$s" -eq 1; then + echo " ok." + else + echo " FAILED (${s})." + errors=$(expr $errors + 1) + cat "$tmpfile" + fi + continue + ;; + esac total_img=$(expr $total_img + 1) # Check that listing EXIF info works - echo -n "Listing EXIF info from \`${img}'..." + echo -n "Listing EXIF info from \`${img}'..." @exif@ "${img}" > "$tmpfile" 2>&1 s="$?" if test "$s" -eq 0; then |