diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-23 19:20:05 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-23 19:20:05 +0100 |
commit | 4bdd93b331eec642873262a524b6b3a6132eb1c9 (patch) | |
tree | 56958e64e49b039afc1962d638715210ed082d3c /tests/Hakyll | |
parent | 07ca8954a5afef265253dd7fa2b77561a8b7470a (diff) | |
download | hakyll-4bdd93b331eec642873262a524b6b3a6132eb1c9.tar.gz |
Add Route code
Diffstat (limited to 'tests/Hakyll')
-rw-r--r-- | tests/Hakyll/Core/Route/Tests.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Hakyll/Core/Route/Tests.hs b/tests/Hakyll/Core/Route/Tests.hs new file mode 100644 index 0000000..17a4123 --- /dev/null +++ b/tests/Hakyll/Core/Route/Tests.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE OverloadedStrings #-} +module Hakyll.Core.Route.Tests + ( tests + ) where + +import Test.Framework +import Test.Framework.Providers.HUnit +import Test.HUnit hiding (Test) + +import Hakyll.Core.Route + +tests :: [Test] +tests = zipWith testCase names matchCases + where + names = map (\n -> "runRoute [" ++ show n ++ "]") [1 :: Int ..] + +-- | Collection of simple cases +-- +matchCases :: [Assertion] +matchCases = + [ Just "foo.html" @=? runRoute (setExtension "html") "foo" + , Just "foo.html" @=? runRoute (setExtension ".html") "foo" + , Just "foo.html" @=? runRoute (setExtension "html") "foo.markdown" + , Just "foo.html" @=? runRoute (setExtension ".html") "foo.markdown" + ] |