-# check -suffix
-tmpfile=`$mkstemp -suffix .txt`
-[ -f "$tmpfile" ] && rm "$tmpfile" || failed=`expr ${failed:-0} + 1`
-check_tmpfile=`echo $tmpfile | grep '^......\.txt$' >/dev/null`
-run_test `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 'eval echo $check_tmpfile' ''
+fi