# check -help
+start_test "-help"
if [ $has_mkstemps -eq 1 ]; then
cat >$expected <<-'EOF'
Usage: mkstemp [switches]
# check -version
+start_test "-version"
# Verified same behavior as compiled mhmail.
case `$mkstemp -v` in
mkstemp\ --*) ;;
# check with no switches
+start_test "with no switches"
tmpfile=`$mkstemp`
if [ -f "$tmpfile" ]; then
rm "$tmpfile"
# check -directory
+start_test "-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 -prefix
+start_test "-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:
fi
+finish_test
exit $failed