blob: b44daca8222fca37158fd848a883a128a685358b (
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
26
27
28
29
30
31
32
|
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Web.Page.Tests
( tests
) where
import Test.Framework
import Test.HUnit hiding (Test)
import qualified Data.Map as M
import Hakyll.Web.Page
import Hakyll.Web.Page.Read
import TestSuite.Util
tests :: [Test]
tests = fromAssertions "readPage"
[ Page (M.singleton "foo" "bar") "body\n" @=? readPage
"--- \n\
\foo: bar \n\
\--- \n\
\body"
, Page M.empty "line one\nlijn twee\n" @=? readPage
"line one\n\
\lijn twee"
, Page (M.fromList [("field1", "unos"), ("veld02", "deux")]) "" @=? readPage
"---\n\
\veld02: deux\n\
\field1: unos\n\
\---"
]
|