-help
EOF
-msgchk -help | head -9 >"$actual" 2>&1
+run_prog msgchk -help | head -9 >"$actual" 2>&1
check "$expected" "$actual"
# check -version
case `msgchk -v` in
msgchk\ --*) ;;
- * ) printf "$0: msgchk -v generated unexpected output\n" >&2
+ * ) printf '%s: msgchk -v generated unexpected output\n' "$0" >&2
failed=`expr ${failed:-0} + 1`;;
esac
You have new mail waiting; last read on
EOF
-msgchk | sed -e 's/last read on.*/last read on/' >"$actual"
+run_prog msgchk | sed -e 's/last read on.*/last read on/' >"$actual"
check "$expected" "$actual"
# check -date
You have new mail waiting; last read on
EOF
-msgchk -nodate -date | sed -e 's/last read on.*/last read on/' >"$actual"
+run_prog msgchk -nodate -date | sed -e 's/last read on.*/last read on/' \
+ >"$actual"
check "$expected" "$actual"
# check -nodate
# check -nonotify all, when there is mail
run_test 'msgchk -nonotify nomail -nonotify all -nodate' ''
-inc -silent
+run_prog inc -silent
# check -notify mail, when there is no mail
run_test 'msgchk -notify mail -nodate' "You don't have any mail waiting"