Skip to content

Commit

Permalink
Added a couple of failure tests for --show-description
Browse files Browse the repository at this point in the history
  • Loading branch information
dfandrich committed Nov 5, 2018
1 parent 677f89c commit ba588b7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/check-show-description.sh
Expand Up @@ -73,6 +73,22 @@ Invalid IFD 'XYZZY'. Valid IFDs are '0', '1', 'EXIF', 'GPS', and 'Interoperabili
EOF
test $? -eq 0 || exit 1

echo Test missing tag name
$EXIFEXE --ifd=0 --show-description > "$tmpfile" 2>&1
test $? -eq 1 || { echo Incorrect return code; exit 1; }
$DIFFEXE - "$tmpfile" <<EOF
You need to specify a tag!
EOF
test $? -eq 0 || exit 1

echo Test missing IFD
$EXIFEXE --tag=1 --show-description > "$tmpfile" 2>&1
test $? -eq 1 || { echo Incorrect return code; exit 1; }
$DIFFEXE - "$tmpfile" <<EOF
You need to specify an IFD!
EOF
test $? -eq 0 || exit 1

# Cleanup
echo PASSED
rm -f "$tmpfile"

0 comments on commit ba588b7

Please sign in to comment.