]> diplodocus.org Git - nmh/blobdiff - test/rcv/test-rcvdist
m_name.c: Move interface to own file.
[nmh] / test / rcv / test-rcvdist
index 5e34615eedd2dd6741eb21e48f651670e210f6db..55c6bf306fe8fc9239138d548051f78b8f0b183c 100755 (executable)
@@ -17,7 +17,9 @@ fi
 setup_test
 
 # Use proper program, likely not the first one on PATH.
-rcvdist="${MH_LIB_DIR}/rcvdist"
+rcvdist="${MH_LIBEXEC_DIR}/rcvdist"
+
+check_exit '-eq 1' $rcvdist -
 
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
@@ -32,7 +34,8 @@ Usage: rcvdist [switches] [switches for postproc] address ...
   -help
 EOF
 
-$rcvdist -help >"$actual" 2>&1
+#### Skip nmh intro text.
+run_prog "$rcvdist" -help | sed '/^$/,$d' >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version
@@ -59,12 +62,12 @@ MHMTSCONF="$mts_fakesendmail"
 # arguments: rcvdist switches
 test_rcvdist ()
 {
-  $rcvdist "$@"
+  run_prog $rcvdist "$@"
 
   # fakesendmail drops the message and any cc's into this mbox.
   mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
   inc -silent -file "$mbox"
-  rm -f "$mbox" "$mbox.map"
+  rm -f "$mbox"
 
   # It's hard to calculate the exact Date: header post is going to
   # use, so we'll just use sed to remove the actual date so we can
@@ -81,7 +84,7 @@ To: Some User <user@example.com>
 Date: Fri, 29 Sep 2006 00:00:00
 Message-Id: 1@test.nmh
 Subject: Testing message 1
-Resent-From: `${MH_LIB_DIR}/ap -format '%(localmbox)' 0 | \
+Resent-From: `${MH_LIBEXEC_DIR}/ap -format '%(localmbox)' 0 | \
               sed 's/^<\(.*\)>$/\1/'`
 Resent-To: recipient@example.com
 Resent-Date: