diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-08 09:42:33 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-08 09:42:33 +0100 |
commit | 547f98dff029d011e6498c901190de11a0bc9c61 (patch) | |
tree | 39b4be2b4b6c2a03ae4fd21c6d0a5cbcd9ddcfa3 /tests | |
parent | d29e4157f1647b06367c2e04c1cdea4c8175fd4c (diff) | |
download | hakyll-547f98dff029d011e6498c901190de11a0bc9c61.tar.gz |
Added link function.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Tests.hs b/tests/Tests.hs index f83399d..3c2cb1e 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -23,6 +23,8 @@ tests = [ testGroup "Util group" [ testProperty "trim length" prop_trim_length , testCase "stripHTML 3" test_strip_html3 , testCase "split 1" test_split1 , testCase "split 2" test_split2 + , testCase "link 1" test_link1 + , testCase "link 2" test_link2 ] , 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 < test_split1 = split "," "1,2,3" @?= ["1", "2", "3"] test_split2 = split "," ",1,2," @?= ["1", "2"] +-- Link test cases. +test_link1 = link "foo bar" "/foo/bar.html" @?= "<a href=\"/foo/bar.html\">foo bar</a>" +test_link2 = link "back home" "/" @?= "<a href=\"/\">back home</a>" + -- CSS compression should always decrease the text length. prop_compress_css_length str = length str >= length (compressCSS str) |