@@ -23,6 +23,8 @@ tests = [ testGroup "Util group" [ testProperty "trim length" prop_trim_length
2323 , testCase "stripHTML 3" test_strip_html3
2424 , testCase "split 1" test_split1
2525 , testCase "split 2" test_split2
26+ , testCase "link 1" test_link1
27+ , testCase "link 2" test_link2
2628 ]
2729
2830 , testGroup "CompressCSS group" [ testProperty "compressCSS length" prop_compress_css_length
@@ -63,6 +65,10 @@ test_strip_html3 = stripHTML "<b>Hakyll</b> is an <i>awesome</i> web framework <
6365test_split1 = split "," "1,2,3" @?= ["1", "2", "3"]
6466test_split2 = split "," ",1,2," @?= ["1", "2"]
6567
68+-- Link test cases.
69+test_link1 = link "foo bar" "/foo/bar.html" @?= "<a href=\"/foo/bar.html\">foo bar</a>"
70+test_link2 = link "back home" "/" @?= "<a href=\"/\">back home</a>"
71+
6672-- CSS compression should always decrease the text length.
6773prop_compress_css_length str = length str >= length (compressCSS str)
6874