From f9c37d448dcffe75585b75ef36980e3a170edc4c Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 19 Oct 2017 01:51:17 +0000 Subject: 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 --- test/tiffcmyk-roundtrip.test | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'test/tiffcmyk-roundtrip.test') 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 -- cgit 1.4.1