Failing tests: URL filters choke on i18n

This commit is contained in:
Pat Hawks 2016-09-24 15:11:04 -05:00
parent 93c5f71faf
commit aebf711c61
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 14 additions and 0 deletions

View File

@ -367,6 +367,15 @@ class TestFilters < JekyllUnitTest
})
assert_equal "http://example.com/base", filter.absolute_url(page_url)
end
should "normalize international URLs" do
page_url = ""
filter = make_filter_mock({
"url" => "http://ümlaut.example.org/",
"baseurl" => nil
})
assert_equal "http://xn--mlaut-jva.example.org/", filter.absolute_url(page_url)
end
end
context "relative_url filter" do
@ -386,6 +395,11 @@ class TestFilters < JekyllUnitTest
assert_equal "/base/#{page_url}", filter.relative_url(page_url)
end
should "normalize international URLs" do
page_url = "错误.html"
assert_equal "%E9%94%99%E8%AF%AF.html", @filter.relative_url(page_url)
end
should "be ok with a nil 'baseurl'" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({