@@ -23,6 +23,8 @@ tests = [ testGroup "Util group" [ testProperty "trim length" prop_trim_length
23 , testCase "stripHTML 3" test_strip_html3
23 , testCase "stripHTML 3" test_strip_html3
24 , testCase "split 1" test_split1
24 , testCase "split 1" test_split1
25 , testCase "split 2" test_split2
25 , testCase "split 2" test_split2
26+ , testCase "link 1" test_link1
27+ , testCase "link 2" test_link2
28 , testGroup "CompressCSS group" [ testProperty "compressCSS length" prop_compress_css_length
30 , 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 <
63test_split1 = split "," "1,2,3" @?= ["1", "2", "3"]
65test_split1 = split "," "1,2,3" @?= ["1", "2", "3"]
64test_split2 = split "," ",1,2," @?= ["1", "2"]
66test_split2 = split "," ",1,2," @?= ["1", "2"]
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>"
66-- CSS compression should always decrease the text length.
72-- CSS compression should always decrease the text length.
67prop_compress_css_length str = length str >= length (compressCSS str)
73prop_compress_css_length str = length str >= length (compressCSS str)