on master help sign in
Some list matches in the tests
commit25b28d8ba4792bf31e2add88607f868f7b88bdd8 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSun 29 May 2011, 12:17 (15 years ago) parentd3f15b1
1 file changed+6−3
tests/Hakyll/Core/Identifier/Tests.hs+6−3
tests/Hakyll/Core/Identifier/Tests.hs+6−3
@@ -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 ]