diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Hakyll/Core/Identifier/Tests.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Hakyll/Core/Identifier/Tests.hs b/tests/Hakyll/Core/Identifier/Tests.hs index 6eb992a..4060b1f 100644 --- a/tests/Hakyll/Core/Identifier/Tests.hs +++ b/tests/Hakyll/Core/Identifier/Tests.hs @@ -6,13 +6,14 @@ module Hakyll.Core.Identifier.Tests import Test.Framework import Test.HUnit hiding (Test) +import Hakyll.Core.Identifier import Hakyll.Core.Identifier.Pattern import TestSuite.Util tests :: [Test] tests = concat [ captureTests - , regexTests + , matchesTests ] captureTests :: [Test] @@ -34,8 +35,10 @@ captureTests = fromAssertions "capture" , Nothing @=? capture "\\*.jpg" "foo.jpg" ] -regexTests :: [Test] -regexTests = fromAssertions "regex" +matchesTests :: [Test] +matchesTests = fromAssertions "matches" [ True @=? matches (regex "^foo/[^x]*$") "foo/bar" , False @=? matches (regex "^foo/[^x]*$") "foo/barx" + , True @=? matches (list ["foo.markdown"]) "foo.markdown" + , False @=? matches (list ["foo"]) (Identifier (Just "foo") "foo") ] |