about summary refs log tree commit diff
path: root/test/stdin-ppm1.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-06-28 17:29:32 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-06-28 17:29:32 +0000
commit23ce26f64c34e30951ad9ade2151552ed77e7357 (patch)
treed73b31a0c2f7c7be4a69f8a8e84e00dd39c432b5 /test/stdin-ppm1.test
parent1b6e51a266008348ad93ed8b6ac9ec91b5024fea (diff)
downloadnetpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.gz
netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.xz
netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.zip
promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4558 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/stdin-ppm1.test')
-rwxr-xr-xtest/stdin-ppm1.test58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/stdin-ppm1.test b/test/stdin-ppm1.test
new file mode 100755
index 00000000..84614326
--- /dev/null
+++ b/test/stdin-ppm1.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# This script tests: ppmchange ppmcolormask ppmdim ppmdist ppmdither ppmflash
+# This script tests: ppmglobe ppmhist ppmlabel ppmntsc ppmrelief ppmshadow
+# This script tests: ppmshift ppmspread ppmtv
+# Also requires: ppmpat
+
+tmpdir=${tmpdir:-/tmp}
+test_ppm=${tmpdir}/test.ppm
+out1=${tmpdir}/out1
+out2=${tmpdir}/out2
+
+ppmpat -g2 -color=rgb:00/00/ff,rgb:ff/00/00 -mesh 12 12 > ${test_ppm}
+
+for testprog in  \
+        ppmchange \
+        "ppmcolormask -color=rgb:0/0/ff " \
+        "ppmdim 0.5 " \
+        ppmdist \
+        ppmdither \
+        "ppmflash 0.5 " \
+        "ppmglobe 12 " \
+        ppmhist \
+        ppmlabel \
+        ppmntsc \
+        ppmrelief \
+        ppmshadow \
+        "ppmshift 2 -seed=1 " \
+        "ppmspread 2 -randomseed=1 " \
+        "ppmtv 0.5 "
+  do
+  ${testprog} ${test_ppm} > ${out1};      status1=$?
+  ${testprog} < ${test_ppm} > ${out2};    status2=$?
+  test -s ${out1};                        status3=$?
+  cmp -s ${out1} ${out2}
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
+  rm ${out1} ${out2}
+  done
+
+rm ${test_ppm}
+
+# These utlities do not have a counterpart "ppmto*" program
+
+# Gouldtoppm
+# Imgtoppm
+# Mtvtoppm
+# Pc1toppm
+# Pgmtoppm
+# Qrttoppm
+# Rawtoppm
+# Sldtoppm
+# Spctoppm
+# Ximtoppm
+
+# Tgatoppm -> Pamtotga
+# Xvminitoppm -> Pamtoxvmini
+
+# Ppm3d and Ppmmix require input two files
+# Ppmfade produces a series of output files