about summary refs log tree commit diff
path: root/test/pnmcat.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-08-09 23:18:52 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-08-09 23:18:52 +0000
commit5d0092ff7809ce7ff3d8102f33a4506fe37d3a67 (patch)
treeca05b02da679170a120eacd3492fdda71b27d7ec /test/pnmcat.test
parentc864f925a6e830240e474e936e13444fc127185a (diff)
downloadnetpbm-mirror-5d0092ff7809ce7ff3d8102f33a4506fe37d3a67.tar.gz
netpbm-mirror-5d0092ff7809ce7ff3d8102f33a4506fe37d3a67.tar.xz
netpbm-mirror-5d0092ff7809ce7ff3d8102f33a4506fe37d3a67.zip
Use new 'pamcat' instead of 'pnmcat' where possible
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4402 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmcat.test')
-rwxr-xr-xtest/pnmcat.test16
1 files changed, 12 insertions, 4 deletions
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}