summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-12-25 23:23:15 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-12-25 23:23:15 +0100
commit6a797b33efd846245d5ba6baebba5732223ae49e (patch)
treed41e03c2fc6045a06f625aac39128f4ffd6feed1 /tests
parent69ffbe03563cdbc7be6b826e2def2fc797442792 (diff)
downloadhakyll-6a797b33efd846245d5ba6baebba5732223ae49e.tar.gz
Broken test case for match/version thing...
Diffstat (limited to 'tests')
-rw-r--r--tests/Hakyll/Core/Rules/Tests.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Hakyll/Core/Rules/Tests.hs b/tests/Hakyll/Core/Rules/Tests.hs
index 27440dc..d6fec31 100644
--- a/tests/Hakyll/Core/Rules/Tests.hs
+++ b/tests/Hakyll/Core/Rules/Tests.hs
@@ -44,6 +44,8 @@ rulesTest = withTestStore $ \store -> do
Just "example.html" @=? runRoutes routes "example.md"
Just "example.md" @=? runRoutes routes (sv "raw" "example.md")
Just "example.md" @=? runRoutes routes (sv "nav" "example.md")
+ Just "example.mv1" @=? runRoutes routes (sv "mv1" "example.md")
+ Just "example.mv2" @=? runRoutes routes (sv "mv2" "example.md")
where
sv g = setVersion (Just g)
expected =
@@ -72,3 +74,12 @@ rules = do
version "nav" $ match (fromList ["example.md"]) $ do
route idRoute
compile copyFileCompiler
+
+ -- Another edge case: different versions in one match
+ match "*.md" $ do
+ version "mv1" $ do
+ route $ setExtension "mv1"
+ compile getResourceString
+ version "mv2" $ do
+ route $ setExtension "mv2"
+ compile getResourceString