From 25b28d8ba4792bf31e2add88607f868f7b88bdd8 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 29 May 2011 12:17:36 +0200 Subject: Some list matches in the tests --- tests/Hakyll/Core/Identifier/Tests.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/Hakyll/Core/Identifier') 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") ] -- cgit v1.2.3