summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Web')
-rw-r--r--tests/Hakyll/Web/Html/Tests.hs1
-rw-r--r--tests/Hakyll/Web/Template/Tests.hs6
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/Hakyll/Web/Html/Tests.hs b/tests/Hakyll/Web/Html/Tests.hs
index 3d0a887..cd362f4 100644
--- a/tests/Hakyll/Web/Html/Tests.hs
+++ b/tests/Hakyll/Web/Html/Tests.hs
@@ -44,6 +44,7 @@ tests = testGroup "Hakyll.Web.Html.Tests" $ concat
, fromAssertions "toUrl"
[ "/foo/bar.html" @=? toUrl "foo/bar.html"
+ , "/foo/bar.html" @=? toUrl "foo\\bar.html" -- Windows-specific
, "/" @=? toUrl "/"
, "/funny-pics.html" @=? toUrl "/funny-pics.html"
, "/funny%20pics.html" @=? toUrl "funny pics.html"
diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs
index a73b92d..1c7c571 100644
--- a/tests/Hakyll/Web/Template/Tests.hs
+++ b/tests/Hakyll/Web/Template/Tests.hs
@@ -12,6 +12,7 @@ import Test.Tasty.HUnit (Assertion, assertBool, testCase,
(@=?), (@?=))
import Data.Either (isLeft)
+import System.IO (nativeNewline, Newline(..))
--------------------------------------------------------------------------------
import Hakyll.Core.Compiler
@@ -149,8 +150,11 @@ testEmbeddedTemplate = do
str <- testCompilerDone store provider "item3" $
applyTemplate embeddedTemplate defaultContext item
- itemBody str @?= "<p>Hello, world</p>\n"
+ itemBody str @?= ("<p>Hello, world</p>" ++ (newline nativeNewline))
cleanTestEnv
where
item = Item "item1" "Hello, world"
+
+ newline LF = "\n"
+ newline CRLF = "\r\n"