about summary refs log tree commit diff
path: root/test/ppmchange.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/ppmchange.test')
-rwxr-xr-xtest/ppmchange.test21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/ppmchange.test b/test/ppmchange.test
index a579631b..039a4a81 100755
--- a/test/ppmchange.test
+++ b/test/ppmchange.test
@@ -2,45 +2,38 @@
 # This script tests: ppmchange
 # Also requires: ppmrainbow pgmramp ppmhist
 
-
 #  Failure message
 ## If this test fails and ppmchange-roundtrip.test succeeds,
 ## the probable cause is a problem with one of the options of
 ## ppmchange: -closeness or -remainder.
 
 tmpdir=${tmpdir:-/tmp}
-rainbow_ppm=${tmpdir}/rainbow.ppm
-changed_ppm=${tmpdir}/changed.ppm
+rainbow_ppm="${tmpdir}"/rainbow.ppm
+changed_ppm="${tmpdir}"/changed.ppm
 
-# Explicit values for intermediate colors: rgb.txt may not be the one
-# Netpbm provides; they may be defined in unusual ways.
+RGBDEF=./rgbt.txt
 
-brown=rgb:67/43/00
-cyan=rgb:00/ff/ff
-yellow=rgb:ff/ff/00
 gray=rgb:7f/7f/7f
 
-
 # Test 1. Should print 22488533 203
-pgmramp -lr 8 8 | ppmchange black black  white white  $gray $gray \
+pgmramp -lr 8 8 | ppmchange black black  white white ${gray} ${gray} \
   -close=10 -remainder=blue | cksum
 
 
 # Test 2. Should print 1008787190 613
 
-ppmrainbow -tmpdir=$tmpdir -width=200 -height=1 red green blue | \
+ppmrainbow -tmpdir="${tmpdir}" -width=200 -height=1 red green blue | \
   tee ${rainbow_ppm} | \
-  ppmchange red $brown   green $brown   blue $brown | cksum
+  ppmchange red brown   green brown   blue brown | cksum
 
 # Validate ${rainbow_ppm}
 # Should print 1983174784 613
 
 cat ${rainbow_ppm} | cksum
 
-
 # Test 3. Should print 2146447222 613
 
-ppmchange red $brown   green $cyan   blue $yellow \
+ppmchange red brown   green cyan   blue yellow \
   -closeness=25 ${rainbow_ppm} | cksum