From 6e7a80e8a3a4ac5d77a2f520cd8ecc1aba6f32ef Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sat, 24 Nov 2012 13:34:50 +0100 Subject: Simpler rules --- tests/Hakyll/Core/Identifier/Tests.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/Hakyll/Core/Identifier') 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,11 +20,21 @@ 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" -- cgit v1.2.3