diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-08 17:54:24 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-08 17:54:24 +0000 |
commit | ab6019e6e1ea8f652f2a9aa17ca4551ed8dfb631 (patch) | |
tree | 59fcfa498faf30cf5cbd812586ce2ab1891a3836 /test | |
parent | 6e6c736053fc028d067f9a0bafbcdddf2b3f1860 (diff) | |
download | netpbm-mirror-ab6019e6e1ea8f652f2a9aa17ca4551ed8dfb631.tar.gz netpbm-mirror-ab6019e6e1ea8f652f2a9aa17ca4551ed8dfb631.tar.xz netpbm-mirror-ab6019e6e1ea8f652f2a9aa17ca4551ed8dfb631.zip |
Add ppmforge-parameters; missing from previous commit
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3627 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r-- | test/ppmforge-parameters.ok | 10 | ||||
-rwxr-xr-x | test/ppmforge-parameters.test | 29 |
2 files changed, 39 insertions, 0 deletions
diff --git a/test/ppmforge-parameters.ok b/test/ppmforge-parameters.ok new file mode 100644 index 00000000..50e68390 --- /dev/null +++ b/test/ppmforge-parameters.ok @@ -0,0 +1,10 @@ +Test 1 +256 256 +100 90 +90 90 +Test 2 +Expected failure 1 +Expected failure 2 +Expected failure 3 +Expected failure 4 +Expected failure 5 diff --git a/test/ppmforge-parameters.test b/test/ppmforge-parameters.test new file mode 100755 index 00000000..48c4ae4c --- /dev/null +++ b/test/ppmforge-parameters.test @@ -0,0 +1,29 @@ +#! /bin/bash +# This script tests: ppmforge +# Also requires: pamfile + +echo "Test 1" + +# Should print 256 256 +ppmforge -night | pamfile -size + +# Width is adjusted if not even +# becomes 100 in this case +ppmforge -night -width=99 -height=90 | pamfile -size + +# Width is adjusted if smaller than height +# brought up to 100 in this case +ppmforge -night -width=80 -height=90 | pamfile -size + +echo "Test 2" + +echo 1>&2 +echo "Invalid command-line arguments." 1>&2 +echo "Error messages should appear below the line." 1>&2 +echo "-----------------------------------------------------------" 1>&2 + +ppmforge -night -dimension=0 || echo "Expected failure 1" +ppmforge -clouds -mesh=1.99 || echo "Expected failure 2" +ppmforge -clouds -power=0 || echo "Expected failure 3" +ppmforge -ice=0 || echo "Expected failure 4" +ppmforge -glaciers=0 || echo "Expected failure 5" |