]> diplodocus.org Git - nmh/blobdiff - test/mhfixmsg/test-mhfixmsg
Added const to argument of getname().
[nmh] / test / mhfixmsg / test-mhfixmsg
index 14b9a58ac4e760c7a767883c1721c948a3b3a259..5ac77ca5e6e0ebefcdea4dbc27a6ced6dd5e6230 100755 (executable)
@@ -45,6 +45,8 @@ Usage: mhfixmsg [+folder] [msgs] [switches]
   -[no]fixcte
   -file file
   -outfile file
+  -rmmproc program
+  -normmproc
   -[no]verbose
   -version
   -help
@@ -555,7 +557,9 @@ Db2yPbwK
 EOF
 
 cp -p `mhpath last` "$expected"
+set +e
 mhfixmsg last
+set -e
 check `mhpath last` "$expected" 'keep first'
 
 
@@ -626,13 +630,12 @@ mhfixmsg last -textcodeset utf-8 -outfile "$actual" 2>"$actual.err"
 if grep "mhfixmsg: Can't convert .* to .* without iconv" "$actual.err" \
   >/dev/null; then
   echo skipping -textcodeset check because nmh was built without iconv
-  set +e
   rm -f "$expected" "$actual" "$actual.err"
 else
-  set +e
   check "$expected" "$actual"
   rm "$actual.err"
 fi
+set -e
 
 
 # check -nofixboundary
@@ -857,6 +860,22 @@ check "${MH_TEST_DIR}/Mail/inbox/14.backup" \
       "${MH_TEST_DIR}/Mail/inbox/14.original"
 
 
+# check -normmproc
+cp "${MH_TEST_DIR}/Mail/inbox/18" "${MH_TEST_DIR}/Mail/inbox/19"
+
+run_test 'mhfixmsg 18 -normmproc'
+check "${MH_TEST_DIR}/Mail/inbox/19" \
+      "${MH_TEST_DIR}/Mail/inbox/,18" 'keep first'
+
+
+# check -rmmproc
+run_test 'mhfixmsg 19 -rmmproc true'
+if test -f '${MH_TEST_DIR}/Mail/inbox/19.backup'; then
+  echo check of mhfixmsg -rmmproc FAILED, should not have created backup file
+  failed=`expr ${failed:-0} + 1`
+fi
+
+
 # make sure there are no tmp files left over
 find "$MH_TEST_DIR/Mail" \( -name 'mhfix*' -o -name ',mhfix*' \) -print \
   >"$actual"