on master help sign in
Added tests for `needlePrefix` function.
commit17054556163750b1c5cbb0787b5855067f21a63a authorIvan N. Veselov <veselov@gmail.com> dateSun 5 May 2013, 11:00 (13 years ago) parente038725
1 file changed+10
tests/Hakyll/Core/Util/String/Tests.hs+10
tests/Hakyll/Core/Util/String/Tests.hs+10
@@ -28,6 +28,16 @@ tests = testGroup "Hakyll.Core.Util.String.Tests" $ concat
2828 , fromAssertions "splitAll"
2929 [ ["λ", "∀x.x", "hi"] @=? splitAll ", *" "λ, ∀x.x, hi"
3030 ]
31+
32+ , fromAssertions "needlePrefix"
33+ [ "ab" @=? needlePrefix "cd" "abcde"
34+ , "xx" @=? needlePrefix "ab" "xxab"
35+ , "xx" @=? needlePrefix "a" "xx"
36+ , "x" @=? needlePrefix "ab" "xabxab"
37+ , "" @=? needlePrefix "ab" "abc"
38+ , "" @=? needlePrefix "ab" "abab"
39+ , "" @=? needlePrefix "" ""
40+ ]
3141 ]
3242
3343 where