blob: 17a41233fa6c0de67ccb50d88e328eb7ff334077 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"
]
|