Skip to content

Commit

Permalink
Add test for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hrj committed Mar 24, 2017
1 parent d80f30c commit da763b9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -10,7 +10,7 @@ before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-add-repository --yes ppa:zoogie/sdl2-snapshots
- sudo apt-get update -qq
- sudo apt-get install g++-4.8 libpng12-dev imagemagick libsdl2-dev
- sudo apt-get install g++-4.8 libpng12-dev imagemagick libsdl2-dev libimage-exiftool-perl

env:
matrix:
Expand Down
1 change: 1 addition & 0 deletions src/Makefile
Expand Up @@ -116,6 +116,7 @@ test: flif test-interface
../tools/test-lossy.sh ./flif ../tools/kodim01.png ../tmp-test/kodim01-lossy.flif ../tmp-test/decoded_kodim01-lossy.png
../tools/test-roundtrip_anim.sh ./flif ../tools/endless_war.gif ../tmp-test/endless_war.flif
../tools/test-roundtrip_anim_framedir.sh ./flif ../tools/bouncing_ball_frames ../tmp-test/bouncing_ball.flif
../tools/test-metadata.sh ./flif ../testFiles/sig05-014.png ../tmp-test/out-meta.flif ../tmp-test/out-meta.png


flif.stats: $(FILES_H) $(FILES_CPP) flif.cpp
Expand Down
Binary file added testFiles/sig05-014.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions tools/test-metadata.sh
@@ -0,0 +1,20 @@
#!/bin/sh

set -ex

FLIF=$1
IN=$2
OUTF=$3
OUTP=$4

EXIFIN=../tmp-test/in-exif.xmp
EXIFOUT=../tmp-test/out-exif.xmp
EXIFTOOL_OPTIONS="-XMP:*"

rm -f ${OUTF} ${OUTP} ${EXIFIN} ${EXIFOUT}
${FLIF} "${IN}" "${OUTF}"
${FLIF} -d ${OUTF} ${OUTP}
exiftool ${EXIFTOOL_OPTIONS} ${IN} -o ${EXIFIN}
exiftool ${EXIFTOOL_OPTIONS} ${OUTP} -o ${EXIFOUT}
diff ${EXIFIN} ${EXIFOUT}

0 comments on commit da763b9

Please sign in to comment.