html = format_value("unknown", "unknown")
assert_dom_equal "unknown", html
+ html = format_value("addr:street", "Rue de l'Amigo")
+ assert_dom_equal "Rue de l'Amigo", html
+
html = format_value("phone", "+1234567890")
assert_dom_equal "<a href=\"tel:+1234567890\" title=\"Call +1234567890\">+1234567890</a>", html
html = format_value("contact", "foo@example.com")
assert_dom_equal "<a title=\"Email foo@example.com\" href=\"mailto:foo@example.com\">foo@example.com</a>", html
+
+ html = format_value("source", "https://example.com")
+ assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>", html
+
+ html = format_value("source", "https://example.com;hello;https://example.net")
+ assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>;hello;<a href=\"https://example.net\" rel=\"nofollow\">https://example.net</a>", html
end
def test_wiki_link