X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/26ac907a39f8711907707d53050c2f950a47242f..b9dda34301de552ad6413e4dd022114fd5219cc9:/test/inc/test-msgchk diff --git a/test/inc/test-msgchk b/test/inc/test-msgchk index 41452306..09b261bc 100755 --- a/test/inc/test-msgchk +++ b/test/inc/test-msgchk @@ -39,13 +39,13 @@ Usage: msgchk [switches] [users ...] -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 @@ -57,7 +57,7 @@ run_test 'msgchk' "You don't have any mail waiting" # Use maildrop specified in mts.conf, i.e., # ${MH_TEST_DIR}/Mail/maildrop, which should not yet exist. -"${MH_LIB_DIR}"/rcvpack <"${MH_TEST_DIR}"/Mail/inbox/1 \ +"${MH_LIBEXEC_DIR}"/rcvpack <"${MH_TEST_DIR}"/Mail/inbox/1 \ "${MH_TEST_DIR}"/Mail/maildrop # check with no arguments and mail waiting @@ -65,7 +65,7 @@ cat >"$expected" <"$actual" +run_prog msgchk | sed -e 's/last read on.*/last read on/' >"$actual" check "$expected" "$actual" # check -date @@ -73,7 +73,8 @@ cat >"$expected" <"$actual" +run_prog msgchk -nodate -date | sed -e 's/last read on.*/last read on/' \ + >"$actual" check "$expected" "$actual" # check -nodate @@ -97,7 +98,7 @@ run_test 'msgchk -nonotify nomail -nodate' 'You have new mail waiting' # 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"