More tests for toUrl function
This commit is contained in:
parent
537e72333f
commit
d456f6ebf7
1 changed files with 9 additions and 4 deletions
|
@ -43,10 +43,15 @@ tests = testGroup "Hakyll.Web.Html.Tests" $ concat
|
|||
]
|
||||
|
||||
, fromAssertions "toUrl"
|
||||
[ "/foo/bar.html" @=? toUrl "foo/bar.html"
|
||||
, "/" @=? toUrl "/"
|
||||
, "/funny-pics.html" @=? toUrl "/funny-pics.html"
|
||||
, "/funny%20pics.html" @=? toUrl "funny pics.html"
|
||||
[ "/foo/bar.html" @=? toUrl "foo/bar.html"
|
||||
, "/" @=? toUrl "/"
|
||||
, "/funny-pics.html" @=? toUrl "/funny-pics.html"
|
||||
, "/funny%20pics.html" @=? toUrl "funny pics.html"
|
||||
-- Test various reserved characters (RFC 3986, section 2.2)
|
||||
, "/%21%2A%27%28%29%3B%3A%40%26.html" @=? toUrl "/!*'();:@&.html"
|
||||
, "/%3D%2B%24%2C/%3F%23%5B%5D.html" @=? toUrl "=+$,/?#[].html"
|
||||
-- Test various characters that are nor reserved, nor unreserved.
|
||||
, "/%E3%81%82%F0%9D%90%87%E2%88%80" @=? toUrl "\12354\119815\8704"
|
||||
]
|
||||
|
||||
, fromAssertions "toSiteRoot"
|
||||
|
|
Loading…
Reference in a new issue