From 17054556163750b1c5cbb0787b5855067f21a63a Mon Sep 17 00:00:00 2001 From: "Ivan N. Veselov" Date: Sun, 5 May 2013 11:00:43 +0300 Subject: Added tests for `needlePrefix` function. --- tests/Hakyll/Core/Util/String/Tests.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3