about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-02-08 01:57:46 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-02-08 01:57:46 +0000
commit2606d971b2a30e3d61644228b2b77e122a45acf6 (patch)
tree5952393dde9d4407ce2033ceae0881b791e25f6f
parent9056e8d1aa0ab45096424666ce22d6b92f3b12b0 (diff)
downloadnetpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.tar.gz
netpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.tar.xz
netpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.zip
Add roundtrip tests for sbig, st4
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2409 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--test/Test-Order2
-rw-r--r--test/all-in-place.ok4
-rwxr-xr-xtest/all-in-place.test4
-rw-r--r--test/sbig-roundtrip.ok1
-rwxr-xr-xtest/sbig-roundtrip.test12
-rw-r--r--test/st4-roundtrip.ok1
-rwxr-xr-xtest/st4-roundtrip.test17
7 files changed, 41 insertions, 0 deletions
diff --git a/test/Test-Order b/test/Test-Order
index 7467ba0b..3ab897ca 100644
--- a/test/Test-Order
+++ b/test/Test-Order
@@ -128,6 +128,8 @@ png-roundtrip.test
 ps-roundtrip.test
 ps-alt-roundtrip.test
 sgi-roundtrip.test
+sbig-roundtrip.test
+st4-roundtrip.test
 sunrast-roundtrip.test
 targa-roundtrip.test
 tiff-roundtrip.test
diff --git a/test/all-in-place.ok b/test/all-in-place.ok
index d37fd561..63a0f232 100644
--- a/test/all-in-place.ok
+++ b/test/all-in-place.ok
@@ -182,6 +182,8 @@ pgmtolispm: ok
 pgmtopbm: ok
 pgmtopgm: ok
 pgmtoppm: ok
+pgmtosbig: ok
+pgmtost4: ok
 pi1toppm: ok
 pi3topbm: ok
 picttoppm: ok
@@ -318,6 +320,7 @@ spctoppm: ok
 spottopgm: ok
 sputoppm: ok
 srftopam: ok
+st4topgm: ok
 sunicontopnm: ok
 svgtopam: ok
 tgatoppm: ok
@@ -334,6 +337,7 @@ xwdtopnm: ok
 ybmtopbm: ok
 yuvsplittoppm: ok
 yuvtoppm: ok
+yuy2topam: ok
 zeisstopnm: ok
 fiascotopnm: ok
 manweb: ok
diff --git a/test/all-in-place.test b/test/all-in-place.test
index 3f31e1c0..d307459a 100755
--- a/test/all-in-place.test
+++ b/test/all-in-place.test
@@ -221,6 +221,8 @@ ordinary_testprogs="\
   pgmtopbm \
   pgmtopgm \
   pgmtoppm \
+  pgmtosbig \
+  pgmtost4 \
   pi1toppm \
   pi3topbm \
   picttoppm \
@@ -357,6 +359,7 @@ ordinary_testprogs="\
   spottopgm \
   sputoppm \
   srftopam \
+  st4topgm \
   sunicontopnm \
   svgtopam \
   tgatoppm \
@@ -373,6 +376,7 @@ ordinary_testprogs="\
   ybmtopbm \
   yuvsplittoppm \
   yuvtoppm \
+  yuy2topam \
   zeisstopnm \
 "
 
diff --git a/test/sbig-roundtrip.ok b/test/sbig-roundtrip.ok
new file mode 100644
index 00000000..430f3f5f
--- /dev/null
+++ b/test/sbig-roundtrip.ok
@@ -0,0 +1 @@
+1571496937 33838
diff --git a/test/sbig-roundtrip.test b/test/sbig-roundtrip.test
new file mode 100755
index 00000000..7a339470
--- /dev/null
+++ b/test/sbig-roundtrip.test
@@ -0,0 +1,12 @@
+#! /bin/bash
+# This script tests: pgmtosbig sbigtopgm
+# Also requires: pamchannel
+
+  alias sbigtopgm="${PBM_TESTPREFIX}sbigtopgm"
+  alias pgmtosbig="${PBM_TESTPREFIX}pgmtosbig"
+  shopt -s expand_aliases
+
+# Should produce 1571496937 33838, cksum of testimg.red
+
+pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
+  pgmtosbig | sbigtopgm | cksum
diff --git a/test/st4-roundtrip.ok b/test/st4-roundtrip.ok
new file mode 100644
index 00000000..e43cd037
--- /dev/null
+++ b/test/st4-roundtrip.ok
@@ -0,0 +1 @@
+185194654 31695
diff --git a/test/st4-roundtrip.test b/test/st4-roundtrip.test
new file mode 100755
index 00000000..bd3da5f1
--- /dev/null
+++ b/test/st4-roundtrip.test
@@ -0,0 +1,17 @@
+#! /bin/bash
+# This script tests: pgmtost4 st4topgm
+# Also requires: pamchannel pamtopnm pamcut
+
+  alias st4topgm="${PBM_TESTPREFIX}st4topgm"
+  alias pgmtost4="${PBM_TESTPREFIX}pgmtost4"
+  shopt -s expand_aliases
+
+# Input image of pgmtost4 must by 192x165
+
+# Should produce 185194654 31695 which is the output of:
+# pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | \
+#   pamtopnm | pamcut -pad 0 0 192 165 | cksum
+
+pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | \
+  pamtopnm | pamcut -pad 0 0 192 165 | \
+  pgmtost4 | st4topgm - | cksum