X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flinkify.t;h=34840410f9a509c7ab02c7004a33b4b29ba37f23;hb=2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f;hp=fe218b91f95c4a89e0d3eaea0e6a2d6052b39c53;hpb=e55bef366b87ecbcb66c93669f41876afc1d2446;p=public-inbox.git
diff --git a/t/linkify.t b/t/linkify.t
index fe218b91..34840410 100644
--- a/t/linkify.t
+++ b/t/linkify.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2018 all contributors
+# Copyright (C) 2016-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -132,4 +132,16 @@ use PublicInbox::Linkify;
'punctuation with unpaired ) OK')
}
+if ('IDN example: ') {
+ my $hc = '月';
+ my $u = "http://www.\x{6708}.example.com/";
+ my $s = $u;
+ my $l = PublicInbox::Linkify->new;
+ $s = $l->linkify_1($s);
+ $s = $l->linkify_2($s);
+ my $expect = qq{http://www.$hc.example.com/};
+ is($s, $expect, 'IDN message escaped properly');
+}
+
done_testing();