on master help sign in
Bring tests up-to-date
commit4925dd828ee8618eec4f209ebb0456826df7c5a4 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateTue 5 Apr 2011, 11:52 (16 years ago) parentecf4c64
2 files changed+15−15
src/Hakyll/Core/Compiler.hs+1−1 tests/Hakyll/Core/Identifier/Tests.hs+14−14
src/Hakyll/Core/Compiler.hs+1−1
@@ -237,7 +237,7 @@ requireAll_ :: (Binary a, Typeable a, Writable a)
237237 -> Compiler b [a]
238238requireAll_ pattern = fromDependencies (const getDeps) >>> fromJob requireAll_'
239239 where
240− getDeps = matches pattern . map unResource . resourceList
240+ getDeps = filterMatches pattern . map unResource . resourceList
241241 requireAll_' = const $ CompilerM $ do
242242 deps <- getDeps . compilerResourceProvider <$> ask
243243 mapM (unCompilerM . getDependency) deps
tests/Hakyll/Core/Identifier/Tests.hs+14−14
@@ -10,18 +10,18 @@ import Hakyll.Core.Identifier.Pattern
1010import TestSuite.Util
1111
1212tests :: [Test]
13−tests = fromAssertions "match"
14− [ Just ["bar"] @=? match "foo/**" "foo/bar"
15− , Just ["foo/bar"] @=? match "**" "foo/bar"
16− , Nothing @=? match "*" "foo/bar"
17− , Just [] @=? match "foo" "foo"
18− , Just ["foo"] @=? match "*/bar" "foo/bar"
19− , Just ["foo/bar"] @=? match "**/qux" "foo/bar/qux"
20− , Just ["foo/bar", "qux"] @=? match "**/*" "foo/bar/qux"
21− , Just ["foo", "bar/qux"] @=? match "*/**" "foo/bar/qux"
22− , Just ["foo"] @=? match "*.html" "foo.html"
23− , Nothing @=? match "*.html" "foo/bar.html"
24− , Just ["foo/bar"] @=? match "**.html" "foo/bar.html"
25− , Just ["foo/bar", "wut"] @=? match "**/qux/*" "foo/bar/qux/wut"
26− , Just ["lol", "fun/large"] @=? match "*cat/**.jpg" "lolcat/fun/large.jpg"
13+tests = fromAssertions "capture"
14+ [ Just ["bar"] @=? capture "foo/**" "foo/bar"
15+ , Just ["foo/bar"] @=? capture "**" "foo/bar"
16+ , Nothing @=? capture "*" "foo/bar"
17+ , Just [] @=? capture "foo" "foo"
18+ , Just ["foo"] @=? capture "*/bar" "foo/bar"
19+ , Just ["foo/bar"] @=? capture "**/qux" "foo/bar/qux"
20+ , Just ["foo/bar", "qux"] @=? capture "**/*" "foo/bar/qux"
21+ , Just ["foo", "bar/qux"] @=? capture "*/**" "foo/bar/qux"
22+ , Just ["foo"] @=? capture "*.html" "foo.html"
23+ , Nothing @=? capture "*.html" "foo/bar.html"
24+ , Just ["foo/bar"] @=? capture "**.html" "foo/bar.html"
25+ , Just ["foo/bar", "wut"] @=? capture "**/qux/*" "foo/bar/qux/wut"
26+ , Just ["lol", "fun/large"] @=? capture "*cat/**.jpg" "lolcat/fun/large.jpg"
2727 ]