about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/all-in-place.ok1
-rwxr-xr-xtest/all-in-place.test1
-rw-r--r--test/legacy-names.ok1
-rwxr-xr-xtest/legacy-names.test1
-rw-r--r--test/pamarith.ok4
-rwxr-xr-xtest/pamarith.test6
-rwxr-xr-xtest/pamundice.test6
-rw-r--r--test/pnmcat.ok6
-rwxr-xr-xtest/pnmcat.test16
-rw-r--r--test/pnmtile.ok2
-rwxr-xr-xtest/pnmtile.test8
-rwxr-xr-xtest/ps-roundtrip.test4
-rw-r--r--test/stdin-pnm1.ok1
-rwxr-xr-xtest/stdin-pnm1.test5
14 files changed, 36 insertions, 26 deletions
diff --git a/test/all-in-place.ok b/test/all-in-place.ok
index 22e4cee5..31854728 100644
--- a/test/all-in-place.ok
+++ b/test/all-in-place.ok
@@ -203,7 +203,6 @@ pjtoppm: ok
 pktopbm: ok
 pngtopam: ok
 pnmalias: ok
-pnmcat: ok
 pnmcolormap: ok
 pnmconvol: ok
 pnmcrop: ok
diff --git a/test/all-in-place.test b/test/all-in-place.test
index ca9b26a6..386d2872 100755
--- a/test/all-in-place.test
+++ b/test/all-in-place.test
@@ -245,7 +245,6 @@ ordinary_testprogs="\
   pktopbm \
   pngtopam \
   pnmalias \
-  pnmcat \
   pnmcolormap \
   pnmconvol \
   pnmcrop \
diff --git a/test/legacy-names.ok b/test/legacy-names.ok
index 27baf672..f491a1ff 100644
--- a/test/legacy-names.ok
+++ b/test/legacy-names.ok
@@ -12,6 +12,7 @@ pgmoil: ok
 pgmslice: ok
 pngtopnm: ok
 pnmarith: ok
+pnmcat: ok
 pnmcomp: ok
 pnmcut: ok
 pnmdepth: ok
diff --git a/test/legacy-names.test b/test/legacy-names.test
index e20dde76..9c0c5697 100755
--- a/test/legacy-names.test
+++ b/test/legacy-names.test
@@ -69,6 +69,7 @@ ordinary_testprogs="\
   pgmslice \
   pngtopnm \
   pnmarith \
+  pnmcat \
   pnmcomp \
   pnmcut \
   pnmdepth \
diff --git a/test/pamarith.ok b/test/pamarith.ok
index c9fc49db..973b8d1b 100644
--- a/test/pamarith.ok
+++ b/test/pamarith.ok
@@ -2,8 +2,8 @@ Test 1
 P2
 16 2
 15
-0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
+2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
 -add
 P2 16 1 15 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 15  
 1927712885 59
diff --git a/test/pamarith.test b/test/pamarith.test
index 4b37f1e4..f0149c66 100755
--- a/test/pamarith.test
+++ b/test/pamarith.test
@@ -1,6 +1,6 @@
 #! /bin/sh
 # This script tests: pamarith
-# Also requires: pamtopnm rgb3toppm pamenlarge pnmcat pamseq pbmmake pgmmake
+# Also requires: pamtopnm rgb3toppm pamenlarge pamcat pamseq pbmmake pgmmake
 # Also requires: ppmpat pamchannel
 
 tmpdir=${tmpdir:-/tmp}
@@ -18,7 +18,7 @@ pgmmake -maxval 15 0.15 16 1 > ${input2_pgm}
 rgb3toppm ${input1_pgm} ${input1_pgm} ${input1_pgm} > ${input1_ppm}
 rgb3toppm ${input2_pgm} ${input2_pgm} ${input2_pgm} > ${input2_ppm}
 
-pnmcat -tb -plain ${input1_pgm} ${input2_pgm}
+pamcat -tb ${input1_pgm} ${input2_pgm} | pamtopnm -assume -plain
 
 for fn in "-add" "-subtract" "-multiply" "-divide" "-difference" \
     "-minimum" "-maximum" "-mean" "-compare" "-equal" \
@@ -43,7 +43,7 @@ echo "Test 2 PBM"
 pbmmake -g 8 1 > ${input1_pbm}
 pbmmake -g 2 1 | pamenlarge -xscale=4 > ${input2_pbm}
 
-pnmcat -tb -plain ${input1_pbm} ${input2_pbm}
+pamcat -tb -plain ${input1_pbm} ${input2_pbm}
 
 for fn in "-add" "-subtract" "-multiply" "-divide" "-difference" \
     "-minimum" "-maximum" "-mean" "-compare" "-equal" \
diff --git a/test/pamundice.test b/test/pamundice.test
index 604fe1b8..20a84503 100755
--- a/test/pamundice.test
+++ b/test/pamundice.test
@@ -1,6 +1,6 @@
 #! /bin/sh
 # This script tests: pamundice
-# Also requires: pamfile pgmmake pnmtile pnmcat
+# Also requires: pamfile pgmmake pnmtile pamcat
 
 tmpdir=${tmpdir:-/tmp}
 fname_stem=${tmpdir}/part
@@ -28,7 +28,7 @@ for y in 0 1 2 3 4
   pamundice -across=3 ${fname_stem}"_"$y"_%1a".pgm > ${tempfile}_"$y"
   done
 
-pnmcat -tb ${tempfile}_[01234] | cksum
+pamcat -tb ${tempfile}_[01234] | pamtopnm --assume | cksum
 rm ${tempfile}_[01234]
 
 # Note: the following 2 are valid.  There should not be warning messages.
@@ -38,7 +38,7 @@ for x in 0 1 2
   pamundice -down=5 ${fname_stem}"_%1d_"$x.pgm > ${tempfile}"_"$x
   done
 
-pnmcat -lr ${tempfile}_[012] | cksum
+pamcat -lr ${tempfile}_[012] | pamtopnm --assume | cksum
 rm ${tempfile}_[012]
 
 rm ${fname_stem}_?_?.pgm
diff --git a/test/pnmcat.ok b/test/pnmcat.ok
index 57769353..96e2b884 100644
--- a/test/pnmcat.ok
+++ b/test/pnmcat.ok
@@ -1,4 +1,8 @@
-Test 1.  Should print a simple PBM image four times
+Test 1.  Should print a simple PBM image five times
+P1
+2 2
+01
+10
 P1
 2 2
 01
diff --git a/test/pnmcat.test b/test/pnmcat.test
index 58ae2642..fd0e83a2 100755
--- a/test/pnmcat.test
+++ b/test/pnmcat.test
@@ -11,9 +11,13 @@ diag_ppm=${tmpdir}/diag.ppm
 diag2lr_ppm=${tmpdir}/diag2lr.ppm
 diag2tb_ppm=${tmpdir}/diag2tb.ppm
 
-echo "Test 1.  Should print a simple PBM image four times"
+echo "Test 1.  Should print a simple PBM image five times"
+# Check input from stdin and from designated input file
+# Similar to tests in stdin-p?m.test
+
 pbmmake -g 2 2 | tee ${check2x2_pbm} | pnmcat -lr -plain
 pnmcat -tb -plain ${check2x2_pbm}
+pnmcat -tb -plain < ${check2x2_pbm}
 pnmcat -lr -black -plain ${check2x2_pbm}
 cat ${check2x2_pbm} | pnmcat -tb -white -plain
 
@@ -39,9 +43,13 @@ cat maze.pbm | pnmcat -tb - ${maze2tb_pbm} | cksum
 rm ${maze2lr_pbm} ${maze2tb_pbm}
 
 echo "Test 6.  Should print a simple PGM image three times"
-pgmramp -diag 4 4 -maxval=3 | tee ${diag_pgm} | pnmcat -lr -plain
-pnmcat -tb -plain ${diag_pgm}
-cat ${diag_pgm} | pnmcat -tb -plain
+# Use sed to scrape off space at line end for compatibility
+# with older versions of pnmcat
+
+pgmramp -diag 4 4 -maxval=3 | tee ${diag_pgm} | pnmcat -lr -plain |\
+  sed 's/ *$//'
+pnmcat -tb -plain ${diag_pgm} | sed 's/ *$//'
+cat ${diag_pgm} | pnmcat -tb -plain | sed 's/ *$//'
 
 rm ${diag_pgm}
 
diff --git a/test/pnmtile.ok b/test/pnmtile.ok
index 279251b8..d28fafa3 100644
--- a/test/pnmtile.ok
+++ b/test/pnmtile.ok
@@ -1,5 +1,5 @@
 4228632379 259
-0 0 : 0
+0 0 0 : 0
 Expected failure 1 1
 Expected failure 2 1
 Expected failure 3 1
diff --git a/test/pnmtile.test b/test/pnmtile.test
index fd126078..b72ef946 100755
--- a/test/pnmtile.test
+++ b/test/pnmtile.test
@@ -1,6 +1,6 @@
 #! /bin/bash
 # This script tests: pnmtile
-# Also requires: pnmcat
+# Also requires: pamcat
 
 
 # Test 1.  Should print 4228632379 259
@@ -8,14 +8,14 @@ pnmtile 40 50 testgrid.pbm | cksum
 
 tmpdir=${tmpdir:-/tmp}
 
-# Test 2.  Compare 2x2 tile images produced by pnmtile and pnmcat
+# Test 2.  Compare 2x2 tile images produced by pnmtile and pamcat
 # Should print 0
 testimg2_ppm=${tmpdir}/testimg2.ppm
 testimg4_ppm=${tmpdir}/testimg4.ppm
 
 pnmtile 454 298 testimg.ppm > ${testimg4_ppm} &&
-pnmcat -lr testimg.ppm testimg.ppm > ${testimg2_ppm} &&
-pnmcat -tb ${testimg2_ppm} ${testimg2_ppm} | \
+pamcat -lr testimg.ppm testimg.ppm > ${testimg2_ppm} &&
+pamcat -tb ${testimg2_ppm} ${testimg2_ppm} | pamtopnm --assume |\
 cmp -s - ${testimg4_ppm}
 echo ${PIPESTATUS[@]} ":" $?
 
diff --git a/test/ps-roundtrip.test b/test/ps-roundtrip.test
index 8b107315..5d7b7d65 100755
--- a/test/ps-roundtrip.test
+++ b/test/ps-roundtrip.test
@@ -1,6 +1,6 @@
 #! /bin/sh
 # This script tests: pnmtops pstopnm
-# Also requires: pamtopnm gs pbmmake pnmshear pnmpad pnmcat
+# Also requires: pamtopnm gs pbmmake pnmshear pnmpad pamcat
 
 
 # Failure message
@@ -37,7 +37,7 @@ pbmmake -g 2 2 > ${g_pbm}
 pbmmake -g 8 4 | \
   pnmshear 45 -noantialias -background=black | \
   pnmpad -right 60 | \
-  pnmcat -tb -jright - ${g_pbm} > ${t_pbm} &&
+  pamcat -tb -jright - ${g_pbm} > ${t_pbm} &&
 for flag in "" "-rle" "-ps -rle -ascii" \
             "-bitspersample=2 -rle" "-ps -bitspersample=4 -rle" \
             "-bitspersample=8 -rle" "-ps -bitspersample=12 -rle -dict"
diff --git a/test/stdin-pnm1.ok b/test/stdin-pnm1.ok
index 0a63558c..9f427b23 100644
--- a/test/stdin-pnm1.ok
+++ b/test/stdin-pnm1.ok
@@ -1,5 +1,4 @@
 pnmalias: 0 0 0 0
-pnmcat -lr : 0 0 0 0
 pnmcolormap all : 0 0 0 0
 pnmconvol -matrix=-1,3,-1 : 0 0 0 0
 pnmcrop: 0 0 0 0
diff --git a/test/stdin-pnm1.test b/test/stdin-pnm1.test
index e692ceba..ae848752 100755
--- a/test/stdin-pnm1.test
+++ b/test/stdin-pnm1.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# This script tests: pnmalias pnmcat pnmcolormap pnmconvol pnmcrop pnmgamma
+# This script tests: pnmalias pnmcolormap pnmconvol pnmcrop pnmgamma
 # This script tests: pnmhisteq pnmhistmap pnminvert pnmmargin pnmmercator
 # This script tests: pnmmontage pnmnlfilt pnmnorm pnmpad pnmquant pnmrotate
 # This script tests: pnmscalefixed pnmshear pnmsmooth pnmtile pnmtoddif
@@ -15,7 +15,6 @@ ppmpat -g2 -color=rgb:00/00/ff,rgb:ff/00/00 -mesh 4 4 > ${small_ppm}
 
 for testprog in  \
         pnmalias \
-        "pnmcat -lr " \
         "pnmcolormap all " \
         "pnmconvol -matrix=-1,3,-1 " \
         pnmcrop \
@@ -57,4 +56,4 @@ rm ${small_ppm}
 # Pnmstitch: requires two input files
 
 # pnmmargin: uses pamflip
-# pnmsmooth: uses pnmconvol
\ No newline at end of file
+# pnmsmooth: uses pnmconvol