about summary refs log tree commit diff
path: root/test/gif-quant-roundtrip.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/gif-quant-roundtrip.test')
-rwxr-xr-xtest/gif-quant-roundtrip.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/gif-quant-roundtrip.test b/test/gif-quant-roundtrip.test
new file mode 100755
index 00000000..8b911740
--- /dev/null
+++ b/test/gif-quant-roundtrip.test
@@ -0,0 +1,18 @@
+#! /bin/bash
+# This script tests: giftopnm pamtogif pnmquant
+# Also requires:
+
+
+# Should print 0
+
+colors=15      # any value between 2 - 256 works
+
+tmpdir=${tmpdir:-/tmp}
+quant_ppm=${tmpdir}/quant.ppm
+
+pnmquant ${colors} testimg.ppm > ${quant_ppm} &&
+pamtogif ${quant_ppm} | giftopnm | \
+   cmp -s - ${quant_ppm} > /dev/null
+echo $?
+
+rm ${quant_ppm}