diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-03-27 23:20:22 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-03-27 23:20:22 +0000 |
commit | 772c4792d998deb70f1719c1a2ad82f2defde5f0 (patch) | |
tree | f512ff95f5e767aa5bb1655caa0aaf87063a624a /test/ppmspread.test | |
parent | f336dfc59346a26a045f7e0df0ecba32d904c55e (diff) | |
download | netpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.tar.gz netpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.tar.xz netpbm-mirror-772c4792d998deb70f1719c1a2ad82f2defde5f0.zip |
Promote Development release to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4318 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/ppmspread.test')
-rwxr-xr-x | test/ppmspread.test | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/test/ppmspread.test b/test/ppmspread.test index 871f7438..d7e0fb37 100755 --- a/test/ppmspread.test +++ b/test/ppmspread.test @@ -1,12 +1,28 @@ -#! /bin/bash +#! /bin/sh # This script tests: ppmspread -# Also requires: ppmtopgm pgmtopbm +# Also requires: pamfile ppmtopgm pgmtopbm -echo "Test 1. Should print 639729144 101484" +# Input/output size does not change + +echo "Test 1." +cat testimg.ppm | pamfile -machine +ppmspread -randomseed=100 20 testimg.ppm | pamfile -machine + +echo "Test 2." +pamfile -size maze.pbm +ppmspread -randomseed=100 20 maze.pbm | pamfile -size + +# No change when spread distance value is 0 + +echo "Test 3. Should print 281226646 481" +ppmspread -randomseed=1 0 maze.pbm | ppmtopgm | pgmtopbm | cksum + +# The following tests will fail when changes are made to the random +# number generator + +echo "Test 4. Should print 639729144 101484" ppmspread -randomseed=1 10 testimg.ppm | cksum -echo "Test 2. Should print 3278353642 685" +echo "Test 5. Should print 3278353642 685" ppmspread -randomseed=1 1 testgrid.pbm | cksum -echo "Test 3. Should print 2425386270 41" -ppmspread -randomseed=1 0 testgrid.pbm | ppmtopgm | pgmtopbm | cksum |