]> diplodocus.org Git - nmh/blobdiff - test/rcv/test-rcvpack
Fixed test-convert to work on Cygwin and other platforms that
[nmh] / test / rcv / test-rcvpack
index 46327b491f8d84c4383e7032e2f41a9b82f81736..958504c6c1bd31cb8bf5027cc2bf007f0bb8ea27 100755 (executable)
@@ -17,7 +17,7 @@ fi
 setup_test
 
 # Use proper program, likely not the first one on PATH.
 setup_test
 
 # Use proper program, likely not the first one on PATH.
-rcvpack="${MH_LIB_DIR}/rcvpack"
+rcvpack="${MH_LIBEXEC_DIR}/rcvpack"
 
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
@@ -33,13 +33,13 @@ Usage: rcvpack [switches] file
   -help
 EOF
 
   -help
 EOF
 
-$rcvpack -help >"$actual" 2>&1
+run_prog $rcvpack -help >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version
 case `$rcvpack -v` in
   rcvpack\ --*) ;;
 check "$expected" "$actual"
 
 # check -version
 case `$rcvpack -v` in
   rcvpack\ --*) ;;
-  *           ) printf "$0: rcvpack -v generated unexpected output\n" >&2
+  *           ) printf '%s: rcvpack -v generated unexpected output\n' "$0" >&2
                 failed=`expr ${failed:-0} + 1`;;
 esac
 
                 failed=`expr ${failed:-0} + 1`;;
 esac
 
@@ -50,29 +50,30 @@ run_test "$rcvpack -nonexistent" 'rcvpack: -nonexistent unknown'
 run_test "$rcvpack" 'rcvpack: rcvpack [switches] file'
 
 # check mbox creation
 run_test "$rcvpack" 'rcvpack: rcvpack [switches] file'
 
 # check mbox creation
-$rcvpack <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox
+run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -mbox
-$rcvpack -mmdf -mbox <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox2
+run_prog $rcvpack -mmdf -mbox ${MH_TEST_DIR}/Mail/mbox2 \
+  <${MH_TEST_DIR}/Mail/inbox/1
 # Filter out "From " lines because their timestamps can differ by a second.
 grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox" >"${MH_TEST_DIR}/Mail/mbox-filt"
 grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox2" >"${MH_TEST_DIR}/Mail/mbox2-filt"
 check "${MH_TEST_DIR}/Mail/mbox-filt" "${MH_TEST_DIR}/Mail/mbox2-filt"
 
 # check append to existing mbox file
 # Filter out "From " lines because their timestamps can differ by a second.
 grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox" >"${MH_TEST_DIR}/Mail/mbox-filt"
 grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox2" >"${MH_TEST_DIR}/Mail/mbox2-filt"
 check "${MH_TEST_DIR}/Mail/mbox-filt" "${MH_TEST_DIR}/Mail/mbox2-filt"
 
 # check append to existing mbox file
-$rcvpack <${MH_TEST_DIR}/Mail/inbox/2 ${MH_TEST_DIR}/Mail/mbox
+run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/2 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/2" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check -mmdf
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/2" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check -mmdf
-$rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/3 ${MH_TEST_DIR}/Mail/mmdf
+run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/3 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/3" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check append to existing mmdf file
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/3" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check append to existing mmdf file
-$rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/4 ${MH_TEST_DIR}/Mail/mmdf
+run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/4 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/4" "${MH_TEST_DIR}/Mail/inbox/13" 'keep first'
 
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/4" "${MH_TEST_DIR}/Mail/inbox/13" 'keep first'