Ken writes:

> Hm.  I was actually thinking something more like the attached (note:
> compiles, but I haven't actually tested it yet).

Let me save you the trouble :-/, it won't work.  The code that sucks
the Fcc: header field value from the replied-to message is
fmt_addcomptext(name, tmpbuf), after this:

    /*
     * pick any interesting stuff out of msg "inb"
     */

Patch to test-repl is attached.

David
diff --git a/test/repl/test-repl b/test/repl/test-repl
index 5d0d7de..6e4a358 100755
--- a/test/repl/test-repl
+++ b/test/repl/test-repl
@@ -28,0 +29 @@ actual=$MH_TEST_DIR/Mail/draft
+start_test -help
@@ -64,0 +66 @@ check "$expected" "$actual"
+start_test -version
@@ -71,0 +74 @@ esac
+start_test 'unknown switch'
@@ -74,0 +78 @@ run_test "repl -nonexistent" 'repl: -nonexistent unknown'
+start_test 'with no switches'
@@ -80,0 +85 @@ printf 'Local-Mailbox: mymailbox@localhost\n' >> "$MH"
+start_test '-cc me'
@@ -97,0 +103 @@ check $expected $actual
+start_test '-nocc me'
@@ -114 +120,2 @@ check $expected $actual
-# check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
+# check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635
+start_test '-cc me with Local- and Alternate-Mailbox addtions, Bug #36635'
@@ -135 +142,2 @@ check $expected $actual
-# check -nocc me with Local- and Alternate-Mailbox addtions, Bug #36635:
+# check -nocc me with Local- and Alternate-Mailbox addtions, Bug #36635
+start_test '-nocc me with Local- and Alternate-Mailbox addtions, Bug #36635'
@@ -154,0 +163 @@ check $expected $actual
+start_test 'quoting of local part of invalid address, Bug #26780'
@@ -184,0 +194,33 @@ check $expected $actual
+# check that Fcc: header isn't propagated
+start_test "Fcc: header isn't propagated"
+form="${MH_TEST_DIR}/$$.components"
+cat > $form <<'EOF'
+From: [email protected]
+%<{from}%(void(width))%(putaddr To: )%>
+Fcc:%<{fcc} %{fcc}%>
+Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%>
+--------
+EOF
+#### There won't be an Fcc: header because there isn't one in the components.
+cat > $expected <<EOF
+From: [email protected]
+To: [email protected]
+Fcc:
+Subject: Re: suppress Fcc:
+--------
+EOF
+cat > `mhpath new`<<EOF
+From: [email protected]
+To: [email protected]
+Fcc: +mischievous
+Subject: suppress Fcc:
+--------
+EOF
+
+run_prog repl -form "${form}" -nowhatnowproc last
+check "${expected}" "${actual}"
+
+test "${failed:-0}" -eq 0 && rm "${form}"
+
+
+finish_test
_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to