|
From: Dan F. <dfa...@us...> - 2010-09-25 07:45:26
|
Update of /cvsroot/libexif/exif/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16777 Modified Files: Makefile.am check-vars.sh.in Added Files: check-help.sh check-show-description.sh check-version.sh Log Message: Added new test scripts Index: check-vars.sh.in =================================================================== RCS file: /cvsroot/libexif/exif/test/check-vars.sh.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- check-vars.sh.in 24 Sep 2010 05:18:09 -0000 1.1 +++ check-vars.sh.in 25 Sep 2010 07:45:16 -0000 1.2 @@ -7,3 +7,4 @@ SRCDIR=@srcdir@ TOPSRCDIR=@top_srcdir@ TOPBLDDIR=@top_builddir@ EXIFEXE=@top_builddir@/exif/exif@EXEEXT@ +DIFFEXE=diff --- NEW FILE: check-version.sh --- #!/bin/sh # Checks that the --version output is sane . check-vars.sh $EXIFEXE --version | grep '^[0-9]\+\.[0-9]\+[0-9.]*$' --- NEW FILE: check-show-description.sh --- #!/bin/sh # Test output of --show-description . check-vars.sh tmpfile="./output.tmp" # Run this in the C locale so the messages are known export LANG=C export LANGUAGE=C failed="0" # Test tag 1 using text name $EXIFEXE --ifd=Interoperability --tag=InteroperabilityIndex --show-description > "$tmpfile" test $? -eq 0 || exit 1 $DIFFEXE "$tmpfile" - <<EOF Tag 'Interoperability Index' (0x0001, 'InteroperabilityIndex'): Indicates the identification of the Interoperability rule. Use "R98" for stating ExifR98 Rules. Four bytes used including the termination code (NULL). see the separate volume of Recommended Exif Interoperability Rules (ExifR98) for other tags used for ExifR98. EOF test $? -eq 0 || exit 1 # Test tag with same number but different IFD using short option names $EXIFEXE --ifd GPS -t1 -s > "$tmpfile" test $? -eq 0 || exit 1 $DIFFEXE "$tmpfile" - <<EOF Tag 'North or South Latitude' (0x0001, 'GPSLatitudeRef'): Indicates whether the latitude is north or south latitude. The ASCII value 'N' indicates north latitude, and 'S' is south latitude. EOF test $? -eq 0 || exit 1 # Test tag of 0 $EXIFEXE --ifd=GPS --tag=0 --show-description > "$tmpfile" test $? -eq 0 || exit 1 $DIFFEXE "$tmpfile" - <<EOF Tag 'GPS Tag Version' (0x0000, 'GPSVersionID'): Indicates the version of <GPSInfoIFD>. The version is given as 2.0.0.0. This tag is mandatory when <GPSInfo> tag is present. (Note: The <GPSVersionID> tag is given in bytes, unlike the <ExifVersion> tag. When the version is 2.0.0.0, the tag value is 02000000.H). EOF test $? -eq 0 || exit 1 # Test --machine-readable using hexadecimal tag $EXIFEXE --ifd=1 --tag=0x103 --show-description --machine-readable > "$tmpfile" test $? -eq 0 || exit 1 $DIFFEXE "$tmpfile" - <<EOF 0x0103 Compression Compression The compression scheme used for the image data. When a primary image is JPEG compressed, this designation is not necessary and is omitted. When thumbnails use JPEG compression, this tag value is set to 6. EOF test $? -eq 0 || exit 1 # Test tag with number not in IFD $EXIFEXE --ifd=EXIF --tag=1 --show-description > "$tmpfile" test $? -eq 1 || exit 1 $DIFFEXE "$tmpfile" - <<EOF EOF test $? -eq 0 || exit 1 # Test tag with number > 65535 $EXIFEXE --ifd=GPS --tag=65537 --show-description > "$tmpfile" test $? -eq 1 || exit 1 $DIFFEXE "$tmpfile" - <<EOF EOF test $? -eq 0 || exit 1 # Test tag with invalid IFD $EXIFEXE --ifd=XYZZY --tag=0x100 --show-description > "$tmpfile" test $? -eq 1 || exit 1 $DIFFEXE "$tmpfile" - <<EOF EOF test $? -eq 0 || exit 1 rm -f "$tmpfile" --- NEW FILE: check-help.sh --- #!/bin/sh # Test that --help output is sane . check-vars.sh # Run this in the C locale so the messages are known export LANG=C export LANGUAGE=C # If this random help string is found, the rest are probably also there $EXIFEXE --help | grep '^ -c, --create-exif Create EXIF data if not existing$' >/dev/null Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/exif/test/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- Makefile.am 24 Sep 2010 05:18:09 -0000 1.2 +++ Makefile.am 25 Sep 2010 07:45:16 -0000 1.3 @@ -3,8 +3,16 @@ # More complicated tests should be put into the libexif-testsuite module. # check-vars.sh.in is automatically included -EXTRA_DIST = check-param-validity.sh +EXTRA_DIST = \ + check-help.sh \ + check-param-validity.sh \ + check-show-description.sh \ + check-version.sh -check_SCRIPTS = check-param-validity.sh +check_SCRIPTS = \ + check-help.sh \ + check-param-validity.sh \ + check-show-description.sh \ + check-version.sh TESTS = $(check_SCRIPTS) |