summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-25 12:06:11 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-25 12:06:11 +0100
commita53235285878d4199947b368ea703c30adf74710 (patch)
tree1996e52dfba691dd57177f07832871fa484744e7 /tests
parent4fa472250e9041f95dc21adefcfd70cfefd09bc2 (diff)
downloadhakyll-a53235285878d4199947b368ea703c30adf74710.tar.gz
Some more tests. Fixed split function.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Tests.hs b/tests/Tests.hs
index eb1f275..fbb2ce4 100644
--- a/tests/Tests.hs
+++ b/tests/Tests.hs
@@ -17,6 +17,8 @@ tests = [ testGroup "Util group" [ testProperty "trim length" prop_trim_length
, testCase "stripHTML 1" test_strip_html1
, testCase "stripHTML 2" test_strip_html2
, testCase "stripHTML 3" test_strip_html3
+ , testCase "split 1" test_split1
+ , testCase "split 2" test_split2
]
, testGroup "CompressCSS group" [ testProperty "compressCSS length" prop_compress_css_length
@@ -44,6 +46,10 @@ test_strip_html2 = stripHTML "text" @?= "text"
test_strip_html3 = stripHTML "<b>Hakyll</b> is an <i>awesome</i> web framework <img src=\"foo.png\" />" @?=
"Hakyll is an awesome web framework "
+-- Split test cases.
+test_split1 = split "," "1,2,3" @?= ["1", "2", "3"]
+test_split2 = split "," ",1,2," @?= ["1", "2"]
+
-- CSS compression should always decrease the text length.
prop_compress_css_length str = length str >= length (compressCSS str)