diff options
author | Ivan N. Veselov <veselov@gmail.com> | 2013-05-05 11:00:43 +0300 |
---|---|---|
committer | Ivan N. Veselov <veselov@gmail.com> | 2013-05-05 11:00:43 +0300 |
commit | 17054556163750b1c5cbb0787b5855067f21a63a (patch) | |
tree | 1c45d3d66857ff41e64aa8fd9b20e8b76c06492d /tests/Hakyll | |
parent | e038725009b8f9a3a3da72bb781be0343c64adb3 (diff) | |
download | hakyll-17054556163750b1c5cbb0787b5855067f21a63a.tar.gz |
Added tests for `needlePrefix` function.
Diffstat (limited to 'tests/Hakyll')
-rw-r--r-- | tests/Hakyll/Core/Util/String/Tests.hs | 10 |
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 |