From c14ac019af18a7a3c96206b9d7f752de2e8ae783 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 19 Nov 2020 18:13:55 +0000 Subject: [PATCH] Add IDN and punycode domain test --- test/linkify_test.exs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/linkify_test.exs b/test/linkify_test.exs index 910ba17..f3b129b 100644 --- a/test/linkify_test.exs +++ b/test/linkify_test.exs @@ -668,5 +668,19 @@ defmodule LinkifyTest do assert Linkify.link(text) == expected end + + test "IDN and punycode domain" do + text = "FrauBücher.com says Neiiighhh!" + + expected = "FrauBücher.com says Neiiighhh!" + + assert Linkify.link(text) == expected + + text = "xn--fraubcher-u9a.com says Neiiighhh!" + + expected = "xn--fraubcher-u9a.com says Neiiighhh!" + + assert Linkify.link(text) == expected + end end end