]> diplodocus.org Git - nmh/blobdiff - test/mkstemp/test-mkstemp
Checked return value of write() calls in mhfixmsg.c,
[nmh] / test / mkstemp / test-mkstemp
index 992a5864933695c31949afdf51614bde515b298f..e5a91b57b771c23e7a4724ee55fbf192b3292a48 100755 (executable)
@@ -72,23 +72,26 @@ fi
 # check -directory
 tmpfile=`$mkstemp -directory "$MHTMPDIR"`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
+# Rely on exit status of grep to detect failure and terminate due to set -e:
 check_tmpfile=`echo $tmpfile | grep "^$MHTMPDIR/......$" >/dev/null`
-run_test `echo $check_tmpfile` ''
+run_test 'eval echo $check_tmpfile' ''
 
 
 # check -prefix
 tmpfile=`$mkstemp -prefix mkstemptest`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
+# Rely on exit status of grep to detect failure and terminate due to set -e:
 check_tmpfile=`echo $tmpfile | grep '^mkstemptest......$' >/dev/null`
-run_test `echo $check_tmpfile` ''
+run_test 'eval echo $check_tmpfile' ''
 
 
 if [ $has_mkstemps -eq 1 ]; then
     # check -suffix
     tmpfile=`$mkstemp -suffix .txt`
     [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
+    # Rely on exit status of grep to detect failure and terminate due to set -e:
     check_tmpfile=`echo $tmpfile | grep '^......\.txt$' >/dev/null`
-    run_test `echo $check_tmpfile` ''
+    run_test 'eval echo $check_tmpfile' ''
 fi