shithub: mc

Download patch

ref: c28f7bb408962ce802fdb6d6a98d434de67d5ba6
parent: 43fed38e2ef36ff95e59bee66cde5cff6333ac71
author: Ori Bernstein <[email protected]>
date: Thu Oct 17 15:50:01 EDT 2013

Portability fix for OSX

    tempfile doesn't exist, so just write to $TMPDIR/unique-name

--- a/test/runtest.sh
+++ b/test/runtest.sh
@@ -50,7 +50,7 @@
 
 
 function expectcompare {
-    t=`tempfile`
+    t=$TMPDIR/myrtest-$1-$RANDOM
     ./$1 $3 > $t
     if cmp $t data/$1-expected; then
         pass $1
@@ -57,6 +57,7 @@
     else
         fail $1
     fi
+    rm -f $t
 }
 
 function expectfcompare {