]> diplodocus.org Git - nmh/blobdiff - test/post/test-sendfiles
send.c, whatnowsbr.c: Delete option variables set but never read.
[nmh] / test / post / test-sendfiles
index af5573ea9d287c8631348c3fd30d8b1f1bee9962..3e55b1ec12c17a6899c453869ce7deb65e2477b9 100755 (executable)
@@ -18,7 +18,7 @@ setup_test
 
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
-localmbox=`$MH_LIB_DIR/ap -format "%(localmbox)" 0`
+localmbox=`$MH_LIBEXEC_DIR/ap -format "%(localmbox)" 0`
 #### Use this script itself for the test file.
 testfiledir="$srcdir/test/post"
 testfile=`basename $0`
@@ -47,25 +47,25 @@ test_sendfiles ()
 
   if [ "$argstyle" = 'new' ]; then
     (cd "$MH_TEST_DIR"  &&
-     sendfiles "$@" -to recipient@example.com -subject "sendfiles test" \
-       "$testfile" >/dev/null 2>&1)
+     run_prog sendfiles "$@" -to recipient@example.com \
+       -subject "sendfiles test" "$testfile" >/dev/null 2>&1)
   elif [ "$argstyle" = 'old' ]; then
     (cd "$MH_TEST_DIR"  &&
-     sendfiles "$@" recipient@example.com "sendfiles test" \
+     run_prog sendfiles "$@" recipient@example.com "sendfiles test" \
        "$testfile" >/dev/null 2>&1)
   fi
 
   # 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"
 
   mhlist -verbose last | sed -e 's/ *$//' -e 's/\(octet-stream\).*$/\1/' \
     >"$actual"
   (cd $MH_TEST_DIR/tmp  &&
    contents=`mhstore -noauto last 2>&1 | \
              sed -e 's/storing message.*as file //'`  &&
-   $uncompress "$contents" | tar xpf -  &&  rm -f "$contents")
+   $uncompress <"$contents" | tar xpf -  &&  rm -f "$contents")
 
   rmm last
   check "$testfiledir/$testfile" "$MH_TEST_DIR/tmp/$testfile" \
@@ -89,7 +89,8 @@ Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...]
   Can use PERSON environment variable instead of -from switch.
 EOF
 
-sendfiles -help >"$actual" 2>&1
+#### Skip nmh intro text.
+run_prog sendfiles -help | sed '/^$/,$d' >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version