@@ -6,13 +6,14 @@ module Hakyll.Core.Identifier.Tests
66import Test.Framework
77import Test.HUnit hiding (Test)
88
9+import Hakyll.Core.Identifier
910import Hakyll.Core.Identifier.Pattern
1011import TestSuite.Util
1112
1213tests :: [Test]
1314tests = concat
1415 [ captureTests
15− , regexTests
16+ , matchesTests
1617 ]
1718
1819captureTests :: [Test]
@@ -34,8 +35,10 @@ captureTests = fromAssertions "capture"
3435 , Nothing @=? capture "\\*.jpg" "foo.jpg"
3536 ]
3637
37−regexTests :: [Test]
38−regexTests = fromAssertions "regex"
38+matchesTests :: [Test]
39+matchesTests = fromAssertions "matches"
3940 [ True @=? matches (regex "^foo/[^x]*$") "foo/bar"
4041 , False @=? matches (regex "^foo/[^x]*$") "foo/barx"
42+ , True @=? matches (list ["foo.markdown"]) "foo.markdown"
43+ , False @=? matches (list ["foo"]) (Identifier (Just "foo") "foo")
4144 ]