Mercurial > hg
diff tests/test-patchbomb @ 9947:4600e6222efb
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Instead of using custom code to split apart addresses, we now use
mail.parseaddrlist() which always does the Right Thing as it relies on Python's
email.Utils.getaddresses().
Previously, 'hg email --to=foo,bar' only respected foo and discarded bar. Also,
commas in names were not allowed in hgrc or the interactive prompt; specifying
'"Lastname, Firstname" <foo>' would confuse patchbomb.
The testcase uses '-m tmp.mbox' because -n (like in other tests) would disable
address mangling.
author | Marti Raudsepp <marti@juffo.org> |
---|---|
date | Thu, 26 Nov 2009 12:23:28 +0200 |
parents | e3237af51def |
children | 4e3a8f3e9dc2 |
line wrap: on
line diff
--- a/tests/test-patchbomb Fri Nov 27 13:53:27 2009 +0100 +++ b/tests/test-patchbomb Thu Nov 26 12:23:28 2009 +0200 @@ -169,6 +169,12 @@ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ -c bar -s test -r 0:1 | fixheaders +echo "% test multi-address parsing" +hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \ + -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \ + --config email.bcc='"Quux, A." <quux>' +cat tmp.mbox | fixheaders + echo "% test multi-byte domain parsing" UUML=`printf '\374'` HGENCODING=iso-8859-1