Attached is a patch to fix the previously reported test errors that
had hardcoded , en lieu of `mhparam sbackup` I commented out the
existing test in test-mhparam, but could not figure out what environment
variable might contain the configured value to incorporate it into
the same heredoc test as everything else. However, since it is used
in so many other test via the backtick execution, it's arguably redundant.

Also, although I did not encounter this when building from the RC1
tarball, I started getting this error using my local clone:

*** /home/belg4mit/nmh/test/testdir/7912.expected       Thu Apr 17 14:44:30 2014
--- /home/belg4mit/nmh/test/testdir/7912.actual Thu Apr 17 14:44:31 2014
***************
*** 1 ****
! /home/belg4mit/nmh/test/testdir/foo's bar
--- 1 ----
! ~/nmh/test/testdir/foo's bar ~/nmh 

./test/whatnow/test-cd: test failed, outputs are in 
/home/belg4mit/nmh/test/testdir/7912.expected and 
/home/belg4mit/nmh/test/testdir/7912.actual.
FAIL: test/whatnow/test-cd

It seems to be using the user's shell somehow, and I have cd aliased to pushd.
diff --git a/configure.ac b/configure.ac
index 932809a..487abec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,12 +47,13 @@ AS_IF([test x"$with_tls" != x -a x"$with_tls" != x"no"],[
       tls_support=yes],[tls_support=no])
 
 dnl Set the backup prefix
-AC_ARG_WITH([hash-backup],
-  AS_HELP_STRING([--with-hash-backup],[use # as the backup prefix (default: 
,)]))
-AS_IF([test x"$with_hash_backup" != x -a x"$with_hash_backup" != x"no"],
-      [backup_prefix="#"], [backup_prefix=","])
+AC_ARG_WITH([backup-prefix],
+  AS_HELP_STRING([--with-backup-prefix=ARG],[use alternate backup prefix 
(default w/o switch: ,)]))
+AS_IF([test x"$with_backup_prefix" != x -a x"$with_backup_prefix" != x"no"],
+      [backup_prefix="$with_backup_prefix"],
+      [backup_prefix=","])
 AC_DEFINE_UNQUOTED([BACKUP_PREFIX], "$backup_prefix",
-    [The prefix that is prepended to the name of message files when they are 
"removed" by rmm. This should typically be `,' or `#'.])dnl
+    [The prefix that is prepended to the name of message files when they are 
"removed" by rmm. This will typically be `,' or `#'.])dnl
 
 dnl What method of posting should post use?
 AC_ARG_WITH([mts],
diff --git a/test/mhbuild/test-forw b/test/mhbuild/test-forw
index 771bec0..9829abe 100755
--- a/test/mhbuild/test-forw
+++ b/test/mhbuild/test-forw
@@ -27,7 +27,7 @@ EOF
 }
 
 draft="$MH_TEST_DIR/$$.draft"
-draftorig="$MH_TEST_DIR/,$$.draft.orig"
+draftorig="$MH_TEST_DIR/`mhparam sbackup`$$.draft.orig"
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg
index d60b9d7..f39d63e 100755
--- a/test/mhfixmsg/test-mhfixmsg
+++ b/test/mhfixmsg/test-mhfixmsg
@@ -172,7 +172,7 @@ folder last >/dev/null
 run_test 'mhfixmsg' ''
 check "$expected" "$MH_TEST_DIR"/Mail/inbox/11 'keep first'
 cp "$MH_TEST_DIR"/Mail/inbox/11.original "$MH_TEST_DIR"/Mail/inbox/11
-check "$MH_TEST_DIR"/Mail/inbox/,11 "$MH_TEST_DIR"/Mail/inbox/11.original
+check "$MH_TEST_DIR"/Mail/inbox/`mhparam sbackup`11 
"$MH_TEST_DIR"/Mail/inbox/11.original
 
 
 # check backup with -file
@@ -180,7 +180,7 @@ cp "$MH_TEST_DIR"/Mail/inbox/11 
"$MH_TEST_DIR"/Mail/inbox/11.original
 folder last >/dev/null
 run_test 'mhfixmsg -file '"$MH_TEST_DIR"/Mail/inbox/11 ''
 check "$MH_TEST_DIR"/Mail/inbox/11 "$expected" 'keep first'
-check "$MH_TEST_DIR"/Mail/inbox/,11 "$MH_TEST_DIR"/Mail/inbox/11.original
+check "$MH_TEST_DIR"/Mail/inbox/`mhparam sbackup`11 
"$MH_TEST_DIR"/Mail/inbox/11.original
 
 
 # check -reformat (enabled by default):  addition of text/plain part
@@ -1082,7 +1082,7 @@ cp "${MH_TEST_DIR}/Mail/inbox/19" 
"${MH_TEST_DIR}/Mail/inbox/20"
 
 run_test 'mhfixmsg 19 -normmproc'
 check "${MH_TEST_DIR}/Mail/inbox/20" \
-      "${MH_TEST_DIR}/Mail/inbox/,19" 'keep first'
+      "${MH_TEST_DIR}/Mail/inbox/`mhparam sbackup`19" 'keep first'
 
 
 # check -rmmproc
diff --git a/test/mhparam/test-mhparam b/test/mhparam/test-mhparam
index 89bcb5d..845c86f 100755
--- a/test/mhparam/test-mhparam
+++ b/test/mhparam/test-mhparam
@@ -137,11 +137,11 @@ check $expected $actual
 run_test 'mhparam formatproc rmmproc' ''
 
 #### Test sbackup separately because it's only passed as a -D compile option.
-case `mhparam sbackup` in
-  ,|\#) ;;
-  *   ) echo mhparam sbackup failed
-        failed=`expr ${failed:-0} + 1` ;;
-esac
+#case `mhparam sbackup` in
+#  ,|\#) ;;
+#  *   ) echo mhparam sbackup failed
+#        failed=`expr ${failed:-0} + 1` ;;
+#esac
 
 # check -component
 run_test 'mhparam -component Path' "Path: $MH_TEST_DIR/Mail"
diff --git a/test/refile/test-refile b/test/refile/test-refile
index 645f4f1..5763f30 100755
--- a/test/refile/test-refile
+++ b/test/refile/test-refile
@@ -172,7 +172,7 @@ run_test 'folders -noheader' \
 other  has 6 messages  (1-12).
 
 TOTAL = 12 messages in 2 folders.'
-if test -f $MH_TEST_DIR/Mail/inbox/,3; then
+if test -f $MH_TEST_DIR/Mail/inbox/`mhparam sbackup`3; then
   echo "$0: refile -unlink failed" 1>&2
   failed=`expr ${failed:-0} + 1`
 fi
@@ -184,7 +184,7 @@ run_test 'folders -noheader' \
 other  has 7 messages  (1-13).
 
 TOTAL = 12 messages in 2 folders.'
-if test -f $MH_TEST_DIR/Mail/inbox/,2; then
+if test -f $MH_TEST_DIR/Mail/inbox/`mhparam sbackup`2; then
   :
 else
   echo "$0: refile -nounlink failed" 1>&2
_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to