[PATCH 3 of 3] mail: fix handling of email addresses with Unicode domains (IDNA)

Marti Raudsepp marti at juffo.org
Fri Nov 6 05:51:42 CST 2009


On Fri, 2009-11-06 at 11:42 +0100, Benoit Boissinot wrote:
> It breaks here (ubuntu karmic):
> 
> -To: bar at xn--nicode-2ya.com
> +To: bar at -en\xfcnicode.com

Thanks for reporting! This happens due to a bashism in the testcase.
This patch should fix the issue on both platforms:

# HG changeset patch
# User Marti Raudsepp <marti at juffo.org>
# Date 1257508097 -7200
# Node ID 732fc0e9d411e0b94e56779d4ac053ceac0349e4
# Parent  aa9ccab5af3753a0ebe7a8a240ba8f1acb78df4a
patchbomb: fix 'echo -en' bashism in test-patchbomb

The echo command doesn't accept options in some shells.
printf is required by the SUSv2 (Single UNIX Specification v2).

diff --git a/tests/test-patchbomb b/tests/test-patchbomb
--- a/tests/test-patchbomb
+++ b/tests/test-patchbomb
@@ -172,7 +172,7 @@
  -c bar -s test -r 0:1 | fixheaders
 
 echo "% test multi-byte domain parsing"
-UUML=`echo -en '\xfc'`
+UUML=`printf '\374'`
 export HGENCODING=iso-8859-1
 hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" \
   -s test -r 0




More information about the Mercurial-devel mailing list