about summary refs log tree commit diff
path: root/test/pnmpsnr.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-07-06 22:04:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-07-06 22:04:28 +0000
commit2a82091a45d67cadfc93148176a446ffd67021f6 (patch)
tree97de970b798441206a6294867eac8a8b9ea49b3b /test/pnmpsnr.test
parent9ebbf59ad1a4272a182172f190908ea3f4d7227b (diff)
downloadnetpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.tar.gz
netpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.tar.xz
netpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.zip
Use red plane of testimg.ppm for test PGM input; rewrite file names which use tmpdir in the manner of symmetry.test; add some failure messages
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2225 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmpsnr.test')
-rwxr-xr-xtest/pnmpsnr.test18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/pnmpsnr.test b/test/pnmpsnr.test
index da88d70d..db1f0079 100755
--- a/test/pnmpsnr.test
+++ b/test/pnmpsnr.test
@@ -6,10 +6,18 @@
   alias pbmmake="${PBM_BINPREFIX}pbmmake"
   shopt -s expand_aliases
 
-pbmmake -w 10 10 > ${tmpdir}/w.pbm
-pbmmake -b 10 10 > ${tmpdir}/b.pbm
-pnmpsnr  ${tmpdir}/w.pbm  ${tmpdir}/b.pbm 2>&1 | \
+tmpdir=${tmpdir:-/tmp}
+
+
+w_pbm=${tmpdir}/w.pbm
+b_pbm=${tmpdir}/b.pbm
+
+pbmmake -w 10 10 > ${w_pbm}
+pbmmake -b 10 10 > ${b_pbm}
+
+pnmpsnr  ${w_pbm}  ${b_pbm} 2>&1 | \
  awk '{print $(NF-1),$NF}'
-pnmpsnr  ${tmpdir}/w.pbm  ${tmpdir}/w.pbm 2>&1 | \
+pnmpsnr  ${w_pbm}  ${w_pbm} 2>&1 | \
  awk '{print $(NF-1),$NF}'
-rm ${tmpdir}/b.pbm ${tmpdir}/w.pbm
+
+rm ${b_pbm} ${w_pbm}