summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Core')
-rw-r--r--tests/Hakyll/Core/Compiler/Tests.hs36
-rw-r--r--tests/Hakyll/Core/Dependencies/Tests.hs19
-rw-r--r--tests/Hakyll/Core/Util/Arrow/Tests.hs14
3 files changed, 8 insertions, 61 deletions
diff --git a/tests/Hakyll/Core/Compiler/Tests.hs b/tests/Hakyll/Core/Compiler/Tests.hs
deleted file mode 100644
index 7ea3e6f..0000000
--- a/tests/Hakyll/Core/Compiler/Tests.hs
+++ /dev/null
@@ -1,36 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-module Hakyll.Core.Compiler.Tests
- ( tests
- ) where
-
-import qualified Data.Map as M
-
-import Test.Framework (Test)
-import Test.Framework.Providers.HUnit (testCase)
-import qualified Test.HUnit as H
-
-import Hakyll.Core.Compiler
-import Hakyll.Core.Resource.Provider.Dummy
-import Hakyll.Core.Util.Arrow
-import TestSuite.Util
-
-tests :: [Test]
-tests =
- [ testCase "byExtension" byExtensionTest
- ]
-
-byExtensionTest :: H.Assertion
-byExtensionTest = do
- provider <- dummyResourceProvider $ M.empty
- txt <- runCompilerJobTest compiler "foo.txt" provider uni
- css <- runCompilerJobTest compiler "bar.css" provider uni
- html <- runCompilerJobTest compiler "qux.html" provider uni
- H.assertEqual "byExtension" "txt" txt
- H.assertEqual "byExtension" "css" css
- H.assertEqual "byExtension" "unknown" html
- where
- uni = ["foo.txt", "bar.css", "qux.html"]
- compiler = byExtension (constA ("unknown" :: String))
- [ (".txt", constA "txt")
- , (".css", constA "css")
- ]
diff --git a/tests/Hakyll/Core/Dependencies/Tests.hs b/tests/Hakyll/Core/Dependencies/Tests.hs
index 22d606f..d6e3094 100644
--- a/tests/Hakyll/Core/Dependencies/Tests.hs
+++ b/tests/Hakyll/Core/Dependencies/Tests.hs
@@ -6,26 +6,23 @@ module Hakyll.Core.Dependencies.Tests
--------------------------------------------------------------------------------
-import Data.List (delete)
-import qualified Data.Map as M
-import qualified Data.Set as S
-import Test.Framework (Test, testGroup)
-import Test.Framework.Providers.HUnit (testCase)
-import Test.HUnit (Assertion, (@=?))
+import Data.List (delete)
+import qualified Data.Map as M
+import qualified Data.Set as S
+import Test.Framework (Test, testGroup)
+import Test.HUnit (Assertion, (@=?))
--------------------------------------------------------------------------------
import Hakyll.Core.Dependencies
import Hakyll.Core.Identifier
+import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
-tests = testGroup "Hakyll.Core.Dependencies.Tests"
- [ testCase "case01" case01
- , testCase "case02" case02
- , testCase "case03" case03
- ]
+tests = testGroup "Hakyll.Core.Dependencies.Tests" $
+ fromAssertions "analyze" [case01, case02, case03]
--------------------------------------------------------------------------------
diff --git a/tests/Hakyll/Core/Util/Arrow/Tests.hs b/tests/Hakyll/Core/Util/Arrow/Tests.hs
deleted file mode 100644
index c0c7eaa..0000000
--- a/tests/Hakyll/Core/Util/Arrow/Tests.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-module Hakyll.Core.Util.Arrow.Tests
- ( tests
- ) where
-
-import Test.Framework (Test)
-import Test.HUnit ((@=?))
-
-import Hakyll.Core.Util.Arrow
-import TestSuite.Util
-
-tests :: [Test]
-tests = fromAssertions "sequenceA"
- [ [8, 20, 1] @=? sequenceA [(+ 4), (* 5), signum] (4 :: Int)
- ]