From 6a797b33efd846245d5ba6baebba5732223ae49e Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 25 Dec 2012 23:23:15 +0100 Subject: Broken test case for match/version thing... --- tests/Hakyll/Core/Rules/Tests.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/Hakyll/Core/Rules') 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 -- cgit v1.2.3