about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-10-19 01:51:17 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-10-19 01:51:17 +0000
commitf9c37d448dcffe75585b75ef36980e3a170edc4c (patch)
tree4265bb0665ac41d3f463c0bf0805eb79ca55fe2a /test
parent54a249d24811a5841b853f9a88a0c5c9871133e3 (diff)
downloadnetpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.tar.gz
netpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.tar.xz
netpbm-mirror-f9c37d448dcffe75585b75ef36980e3a170edc4c.zip
Change to report format of tests which use Pnmpsnr
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3086 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r--test/fiasco-roundtrip.ok2
-rwxr-xr-xtest/fiasco-roundtrip.test7
-rw-r--r--test/jpeg-roundtrip.ok6
-rwxr-xr-xtest/jpeg-roundtrip.test17
-rwxr-xr-xtest/jpeg2k-roundtrip.test2
-rw-r--r--test/tiffcmyk-roundtrip.ok10
-rwxr-xr-xtest/tiffcmyk-roundtrip.test25
7 files changed, 49 insertions, 20 deletions
diff --git a/test/fiasco-roundtrip.ok b/test/fiasco-roundtrip.ok
index 8a5e8ff6..544093d3 100644
--- a/test/fiasco-roundtrip.ok
+++ b/test/fiasco-roundtrip.ok
@@ -1 +1 @@
-  3 1 1 1
\ No newline at end of file
+  3 1000.00 1000.00 1000.00
\ No newline at end of file
diff --git a/test/fiasco-roundtrip.test b/test/fiasco-roundtrip.test
index 6fd43432..8325a37d 100755
--- a/test/fiasco-roundtrip.test
+++ b/test/fiasco-roundtrip.test
@@ -7,7 +7,7 @@
 # TODO: As in jpeg-rountrip.test the threshold has been determined
 # without much thought.
 
-# Should print 3 1 1 1
+# Should print 3 1000.00 1000.00 1000.00
 
 tmpdir=${tmpdir:-/tmp}
 padded_ppm=${tmpdir}/padded.ppm
@@ -15,6 +15,9 @@ padded_ppm=${tmpdir}/padded.ppm
 pnmpad --black --bottom 1 --left 1 testimg.ppm > ${padded_ppm} &&
 pnmtofiasco --progress-meter 0 ${padded_ppm} | fiascotopnm | \
     pnmpsnr -machine - ${padded_ppm} | \
-    awk '{printf("%3d %1d %1d %1d",NF,$1>14.0,$2>21.0,$3>$29.0)}'
+    awk '{printf("%3d %.2f %.2f %.2f", NF,
+                  $1>14.0 ? 1000.00 : $1,
+                  $2>21.0 ? 1000.00 : $2,
+                  $3>29.0 ? 1000.00 : $3) }'
 
 rm ${padded_ppm}
\ No newline at end of file
diff --git a/test/jpeg-roundtrip.ok b/test/jpeg-roundtrip.ok
index f32c58a2..9a93f216 100644
--- a/test/jpeg-roundtrip.ok
+++ b/test/jpeg-roundtrip.ok
@@ -1,3 +1,3 @@
-  3 1 1 1
-  3 1 1 1
-  3 1 1 1
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
diff --git a/test/jpeg-roundtrip.test b/test/jpeg-roundtrip.test
index 1afc5423..23df6341 100755
--- a/test/jpeg-roundtrip.test
+++ b/test/jpeg-roundtrip.test
@@ -10,12 +10,23 @@
 
 pnmtojpeg testimg.ppm | jpegtopnm | \
   pnmpsnr -machine - testimg.ppm |\
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>55.0 ? 1000.00 : $1,
+                $2>57.0 ? 1000.00 : $2,
+                $3>48.0 ? 1000.00 : $3) }'
+
 
 pnmtojpeg testimg.ppm -opt | jpegtopnm | \
   pnmpsnr -machine - testimg.ppm |\
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>55.0 ? 1000.00 : $1,
+                $2>57.0 ? 1000.00 : $2,
+                $3>48.0 ? 1000.00 : $3) }'
+
 
 pnmtojpeg testimg.ppm -progressive | jpegtopnm | \
   pnmpsnr -machine - testimg.ppm |\
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>55.0,$2>57.0,$3>48.0)}'
\ No newline at end of file
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>55.0 ? 1000.00 : $1,
+                $2>57.0 ? 1000.00 : $2,
+                $3>48.0 ? 1000.00 : $3) }'
diff --git a/test/jpeg2k-roundtrip.test b/test/jpeg2k-roundtrip.test
index eab6fb1e..0995849d 100755
--- a/test/jpeg2k-roundtrip.test
+++ b/test/jpeg2k-roundtrip.test
@@ -1,6 +1,6 @@
 #! /bin/bash
 # This script tests: pamtojpeg2k jpeg2ktopam
-# Also requires: pnmpsnr
+# Also requires:
 
 # Should produce 1926073387 101484
 
diff --git a/test/tiffcmyk-roundtrip.ok b/test/tiffcmyk-roundtrip.ok
index e152d0a7..5f4963cd 100644
--- a/test/tiffcmyk-roundtrip.ok
+++ b/test/tiffcmyk-roundtrip.ok
@@ -1,5 +1,5 @@
-  3 1 1 1
-  3 1 1 1
-  3 1 1 1
-  3 1 1 1
-  3 1 1 1
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
+  3 1000.00 1000.00 1000.00
diff --git a/test/tiffcmyk-roundtrip.test b/test/tiffcmyk-roundtrip.test
index e123d807..99e02c48 100755
--- a/test/tiffcmyk-roundtrip.test
+++ b/test/tiffcmyk-roundtrip.test
@@ -16,31 +16,46 @@ output_tiff=${tmpdir}/output.tiff
 pnmtotiffcmyk testimg.ppm > ${output_tiff} && \
   tifftopnm -headerdump -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 # Note that "-rowsperstrip=1" does not work
 pnmtotiffcmyk -rowsperstrip 1 -lsb2msb testimg.ppm > ${output_tiff} && \
   tifftopnm -respectfillorder -byrow  ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -packbits testimg.ppm > ${output_tiff} && \
   tifftopnm -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -lzw testimg.ppm > ${output_tiff} && \
   tifftopnm -byrow ${output_tiff} | \
     pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 
 pnmtotiffcmyk -lzw -predictor 2 testimg.ppm > ${output_tiff} && \
   tifftopnm -respectfillorder -byrow ${output_tiff} | \
   pnmpsnr -machine - testimg.ppm | \
-  awk '{printf("%3d %1d %1d %1d\n",NF,$1>45.0,$2>59.5,$3>56.5)}'
+  awk '{printf("%3d %.2f %.2f %.2f\n", NF,
+                $1>45.0 ? 1000.00 : $1,
+                $2>59.5 ? 1000.00 : $2,
+                $3>56.5 ? 1000.00 : $3) }'
 
 rm ${output_tiff}
\ No newline at end of file