X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flinkify.t;fp=t%2Flinkify.t;h=fe218b91f95c4a89e0d3eaea0e6a2d6052b39c53;hb=e55bef366b87ecbcb66c93669f41876afc1d2446;hp=bef4ffd6fefb360533c007cb53a74428315f8f34;hpb=f94c3a195a25a31d0215cd175938008fca473378;p=public-inbox.git
diff --git a/t/linkify.t b/t/linkify.t
index bef4ffd6..fe218b91 100644
--- a/t/linkify.t
+++ b/t/linkify.t
@@ -50,6 +50,11 @@ use PublicInbox::Linkify;
$s = $l->linkify_2($s);
is($s, qq(hello $u world), 'URL preserved');
+ $s = "$u. hi";
+ $s = $l->linkify_1($s);
+ $s = $l->linkify_2($s);
+ is($s, qq($u. hi), 'paired () in URL OK');
+
$u .= "?query=a";
$s = "hello $u world";
$s = $l->linkify_1($s);
@@ -117,4 +122,14 @@ use PublicInbox::Linkify;
}
}
+# dangling ')' cf. see MaintNotes in git.git todo branch
+{
+ my $l = PublicInbox::Linkify->new;
+ my $s = '(see http://example.com/).';
+ $s = $l->linkify_1($s);
+ $s = $l->linkify_2($s);
+ like($s, qr!\(see ]+>http://example\.com/\)\.!s,
+ 'punctuation with unpaired ) OK')
+}
+
done_testing();