From b822e7857db551e6c717f82ec086c1027b550d98 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 7 Apr 2015 01:36:10 +0000 Subject: Replace some GNU-only code with more portable version git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2453 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/Execute-Tests | 4 ++-- test/ppmdim.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Execute-Tests b/test/Execute-Tests index 12418bed..78091e6b 100755 --- a/test/Execute-Tests +++ b/test/Execute-Tests @@ -59,7 +59,7 @@ srcdir=$(dirname $0) if [ -z $tmpdir ] then - tmpdir_created=$(mktemp -d) || exit 1; + tmpdir_created=$(mktemp -d "${TMPDIR:-/tmp}/netpbm.XXXXXXXX") || exit 1; export tmpdir=${tmpdir_created} else tmpdir_created=""; @@ -297,7 +297,7 @@ echo "TOTAL TESTABLE" $total_testable echo ================== echo "All tests done." -date -R -u +date -u +"%a, %d %b %Y %H:%M:%S %z" # Exit with status 0 if all possible tests succeeded, 1 otherwise. diff --git a/test/ppmdim.test b/test/ppmdim.test index 438d41d3..848e2e9f 100755 --- a/test/ppmdim.test +++ b/test/ppmdim.test @@ -19,7 +19,7 @@ for i in 0.125 0.25 0.5 0.75 0.1 0.0117 0.2 0.4 0.333 0.666 0.8 0.9 0.95 pamfunc -mult=$i testimg.ppm > ${dim2_ppm} pamarith -diff ${dim1_ppm} ${dim2_ppm} | \ pamsumm -mean -brief | \ - awk '{print $1<0.75 ? "ok" : "fail"}' + awk '{print ($1<0.75) ? "ok" : "fail"}' done rm ${dim1_ppm} ${dim2_ppm} -- cgit 1.4.1