about summary refs log tree commit diff
path: root/test/pambrighten.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-14 19:05:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-14 19:05:28 +0000
commit49b0eb1a2a99dc82b81a9355bb7851db6423486a (patch)
tree23d3f3ff66a83e1968e648554a85c2f334302281 /test/pambrighten.test
parent771e1f9460d70eb92f07716f88d9caa95f86527a (diff)
downloadnetpbm-mirror-49b0eb1a2a99dc82b81a9355bb7851db6423486a.tar.gz
netpbm-mirror-49b0eb1a2a99dc82b81a9355bb7851db6423486a.tar.xz
netpbm-mirror-49b0eb1a2a99dc82b81a9355bb7851db6423486a.zip
Factor out 'test invalid' checks
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4837 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pambrighten.test')
-rwxr-xr-xtest/pambrighten.test56
1 files changed, 10 insertions, 46 deletions
diff --git a/test/pambrighten.test b/test/pambrighten.test
index 00e405dd..d79ad583 100755
--- a/test/pambrighten.test
+++ b/test/pambrighten.test
@@ -10,7 +10,7 @@ cat > ${input_ppm} << EOF
 P3
 8 1
 255
-0 0 0 0 0 100 0 100 0 0 100 100 100 0 0 100 0 100 100 100 0 100 100 100 
+0 0 0 0 0 100 0 100 0 0 100 100 100 0 0 100 0 100 100 100 0 100 100 100
 EOF
 
 # Test 1
@@ -50,50 +50,14 @@ pambrighten -s +200 ${input_pgm} | cksum
 
 rm ${input_pgm}
 
+echo "Test Invalid"
 
-# Test 2
-# These should all fail.
+. ${srcdir}/test-invalid.inc
 
-echo "Invalid command-line argument combinations." 1>&2
-echo "Error messages should appear below the line." 1>&2
-echo "-----------------------------------------------------------" 1>&2
-
-echo "Test Error: Should print 1 six times"
-
-output_ppm=${tmpdir}/output.ppm
-
-pambrighten -v -120 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten -s -120 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten 10 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-
-
-echo "Test Error: Should print 99 followed by 1, four times"
-
-pambrighten -s 1.20 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten -v 10.5 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten -v testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten -s testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-
-
-rm -f ${output_ppm}
+invCmd "pambrighten -v -120 testimg.ppm"
+invCmd "pambrighten -s -120 testimg.ppm"
+invCmd "pambrighten 10 testimg.ppm"
+invCmd "pambrighten -s 1.20 testimg.ppm"
+invCmd "pambrighten -v 10.5 testimg.ppm"
+invCmd "pambrighten -v testimg.ppm"
+invCmd "pambrighten -s testimg.ppm"