about summary refs log tree commit diff
path: root/test/pamfile.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-08 16:41:37 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-06-08 16:41:37 +0000
commit7013617be07aa6cc9cb6a12d39e135bb59a8f75e (patch)
treed150d105530f064eafdd670dead19fc45b5449b6 /test/pamfile.test
parent31bcb07d386170e7c65495b5c0b4ad173b74b911 (diff)
downloadnetpbm-mirror-7013617be07aa6cc9cb6a12d39e135bb59a8f75e.tar.gz
netpbm-mirror-7013617be07aa6cc9cb6a12d39e135bb59a8f75e.tar.xz
netpbm-mirror-7013617be07aa6cc9cb6a12d39e135bb59a8f75e.zip
miscellaneous test updates, especially invalid command line option combinations
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3624 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pamfile.test')
-rwxr-xr-xtest/pamfile.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pamfile.test b/test/pamfile.test
index 545a2289..32771bfe 100755
--- a/test/pamfile.test
+++ b/test/pamfile.test
@@ -2,15 +2,31 @@
 # This script tests: pamfile
 # Also requires: pamchannel pamtopnm
 
+echo "Test 1"
 
 pamfile testimg.ppm
 pamfile testgrid.pbm
 pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | pamfile
 pamchannel -tupletype="GRAYSCALE" -infile=testimg.ppm 0 | pamfile
 
+echo "Test 2"
+
 cat testgrid.pbm testgrid.pbm testgrid.pbm | pamfile -count
 cat testgrid.pbm testgrid.pbm testgrid.pbm | pamfile -allimages
 
+echo "Test 3"
+
 pamfile -size testimg.ppm
 pamfile -machine testimg.ppm
 cat testgrid.pbm testimg.ppm testgrid.pbm | pamfile -machine
+
+echo "Test 4"
+
+echo 1>&2
+echo "Invalid command-line argument combinations." 1>&2
+echo "Error messages should appear below the line." 1>&2
+echo "-----------------------------------------------------------" 1>&2
+
+pamfile -size -machine  testimg.ppm || echo "Expected failure 1"
+pamfile -count -machine testimg.ppm || echo "Expected failure 2"
+head -n1 testimg.ppm | pamfile || echo "Expected failure 3"
\ No newline at end of file