summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core/Identifier
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-24 13:34:50 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-24 13:35:00 +0100
commit6e7a80e8a3a4ac5d77a2f520cd8ecc1aba6f32ef (patch)
tree28bbc77da81f485db5aa696d658e69c142c13bdf /tests/Hakyll/Core/Identifier
parent0a6b2b259862b90ccca11281de89091e2e01cb4d (diff)
downloadhakyll-6e7a80e8a3a4ac5d77a2f520cd8ecc1aba6f32ef.tar.gz
Simpler rules
Diffstat (limited to 'tests/Hakyll/Core/Identifier')
-rw-r--r--tests/Hakyll/Core/Identifier/Tests.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Hakyll/Core/Identifier/Tests.hs b/tests/Hakyll/Core/Identifier/Tests.hs
index b477a7c..a31b424 100644
--- a/tests/Hakyll/Core/Identifier/Tests.hs
+++ b/tests/Hakyll/Core/Identifier/Tests.hs
@@ -6,6 +6,7 @@ module Hakyll.Core.Identifier.Tests
--------------------------------------------------------------------------------
+import Data.Monoid (mappend, mempty)
import Test.Framework (Test, testGroup)
import Test.HUnit ((@=?))
@@ -19,12 +20,22 @@ import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Hakyll.Core.Identifier.Tests" $ concat
- [ captureTests
+ [ isLiteralTests
+ , captureTests
, matchesTests
]
--------------------------------------------------------------------------------
+isLiteralTests :: [Test]
+isLiteralTests = fromAssertions "isLiteral"
+ [ Just "index.html" @=? fromLiteral "index.html"
+ , Nothing @=? fromLiteral "posts/*.markdown"
+ , Just "test.txt" @=? fromLiteral ("test.txt" `mappend` mempty)
+ ]
+
+
+--------------------------------------------------------------------------------
captureTests :: [Test]
captureTests = fromAssertions "capture"
[ Just ["bar"] @=? capture "foo/**" "foo/bar"