summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan N. Veselov <veselov@gmail.com>2013-05-05 11:00:43 +0300
committerIvan N. Veselov <veselov@gmail.com>2013-05-05 11:00:43 +0300
commit17054556163750b1c5cbb0787b5855067f21a63a (patch)
tree1c45d3d66857ff41e64aa8fd9b20e8b76c06492d /tests
parente038725009b8f9a3a3da72bb781be0343c64adb3 (diff)
downloadhakyll-17054556163750b1c5cbb0787b5855067f21a63a.tar.gz
Added tests for `needlePrefix` function.
Diffstat (limited to 'tests')
-rw-r--r--tests/Hakyll/Core/Util/String/Tests.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Hakyll/Core/Util/String/Tests.hs b/tests/Hakyll/Core/Util/String/Tests.hs
index d5dcdb7..973f6ff 100644
--- a/tests/Hakyll/Core/Util/String/Tests.hs
+++ b/tests/Hakyll/Core/Util/String/Tests.hs
@@ -28,6 +28,16 @@ tests = testGroup "Hakyll.Core.Util.String.Tests" $ concat
, fromAssertions "splitAll"
[ ["λ", "∀x.x", "hi"] @=? splitAll ", *" "λ, ∀x.x, hi"
]
+
+ , fromAssertions "needlePrefix"
+ [ "ab" @=? needlePrefix "cd" "abcde"
+ , "xx" @=? needlePrefix "ab" "xxab"
+ , "xx" @=? needlePrefix "a" "xx"
+ , "x" @=? needlePrefix "ab" "xabxab"
+ , "" @=? needlePrefix "ab" "abc"
+ , "" @=? needlePrefix "ab" "abab"
+ , "" @=? needlePrefix "" ""
+ ]
]
where