From 86d0b68aed6e82fd4a6c935ce6113937023f6e6b Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sat, 9 Feb 2013 15:11:40 +0100 Subject: Start provider rewrite --- tests/Hakyll/Core/Provider/Tests.hs | 1 + tests/Hakyll/Core/Rules/Tests.hs | 1 + tests/Hakyll/Core/Store/Tests.hs | 1 + tests/Hakyll/Web/Template/Tests.hs | 2 ++ 4 files changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/Hakyll/Core/Provider/Tests.hs b/tests/Hakyll/Core/Provider/Tests.hs index 5fd9c0d..abe5c1d 100644 --- a/tests/Hakyll/Core/Provider/Tests.hs +++ b/tests/Hakyll/Core/Provider/Tests.hs @@ -37,3 +37,4 @@ case01 = do doesntExist <- resourceMetadata provider "doesntexist.md" M.empty @=? doesntExist + cleanTestEnv diff --git a/tests/Hakyll/Core/Rules/Tests.hs b/tests/Hakyll/Core/Rules/Tests.hs index d43772d..ee12010 100644 --- a/tests/Hakyll/Core/Rules/Tests.hs +++ b/tests/Hakyll/Core/Rules/Tests.hs @@ -51,6 +51,7 @@ rulesTest = do Just "example.mv1" @=? runRoutes routes (sv "mv1" "example.md") Just "example.mv2" @=? runRoutes routes (sv "mv2" "example.md") readIORef ioref >>= assert + cleanTestEnv where sv g = setVersion (Just g) expected = diff --git a/tests/Hakyll/Core/Store/Tests.hs b/tests/Hakyll/Core/Store/Tests.hs index 19b268b..95140e3 100644 --- a/tests/Hakyll/Core/Store/Tests.hs +++ b/tests/Hakyll/Core/Store/Tests.hs @@ -67,3 +67,4 @@ wrongType = do e == typeOf (undefined :: Int) && t == typeOf (undefined :: String) _ -> False + cleanTestEnv diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs index 6fb5233..b96cfa5 100644 --- a/tests/Hakyll/Web/Template/Tests.hs +++ b/tests/Hakyll/Web/Template/Tests.hs @@ -44,6 +44,7 @@ case01 = do pandocCompiler >>= applyTemplate (itemBody tpl) testContext out @=? itemBody item + cleanTestEnv -------------------------------------------------------------------------------- @@ -63,6 +64,7 @@ testApplyJoinTemplateList = do applyJoinTemplateList ", " tpl defaultContext [i1, i2] str @?= "Hello, World" + cleanTestEnv where i1 = Item "item1" "Hello" i2 = Item "item2" "World" -- cgit v1.2.3