summaryrefslogtreecommitdiff
path: root/openxmp/tests/testcore.sh
diff options
context:
space:
mode:
Diffstat (limited to 'openxmp/tests/testcore.sh')
-rwxr-xr-xopenxmp/tests/testcore.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/openxmp/tests/testcore.sh b/openxmp/tests/testcore.sh
new file mode 100755
index 0000000..27b8295
--- /dev/null
+++ b/openxmp/tests/testcore.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Test script.
+# Currently only make sure dumpmainxmp does not crash
+# Write by Hubert Figuiere <hub@figuiere.net>
+
+if [ -z $srcdir ] ; then
+ echo "$srcdir srcdir not defined."
+ return 255
+fi
+
+SAMPLES="BlueSquare.ai BlueSquare.eps BlueSquare.jpg BlueSquare.mp3 BlueSquare.png BlueSquare.tif BlueSquare.avi BlueSquare.indd BlueSquare.pdf BlueSquare.psd BlueSquare.wav"
+SAMPLES_DIR=$srcdir/../../samples/BlueSquares
+DUMPMAINXMP_PROG=../../samples/source/dumpmainxmp
+
+if [ ! -x $DUMPMAINXMP_PROG ] ; then
+ echo "$DUMPMAINXMP_PROG not executable."
+ return 255
+fi
+
+for i in $SAMPLES
+do
+ echo "Running $DUMPMAINXMP_PROG $SAMPLES_DIR/$i"
+ $DUMPMAINXMP_PROG $SAMPLES_DIR/$i > /dev/null
+ if [ $? -ne 0 ] ; then
+ echo "Failed"
+ return 255
+ fi
+done \ No newline at end of file