From a27e254e0b1f9359653aa378565cc867049342e2 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 29 May 2012 23:39:07 +0200 Subject: Add constRoute Closes #67 --- tests/Hakyll/Core/Routes/Tests.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/Hakyll/Core') diff --git a/tests/Hakyll/Core/Routes/Tests.hs b/tests/Hakyll/Core/Routes/Tests.hs index 3361846..d204b16 100644 --- a/tests/Hakyll/Core/Routes/Tests.hs +++ b/tests/Hakyll/Core/Routes/Tests.hs @@ -6,6 +6,7 @@ module Hakyll.Core.Routes.Tests import Test.Framework import Test.HUnit hiding (Test) +import Hakyll.Core.Identifier import Hakyll.Core.Routes import TestSuite.Util @@ -16,6 +17,11 @@ tests = fromAssertions "runRoutes" , Just "foo.html" @=? runRoutes (setExtension "html") "foo.markdown" , Just "foo.html" @=? runRoutes (setExtension ".html") "foo.markdown" + , Just "neve ro ddo reven" @=? + runRoutes (customRoute (reverse . toFilePath )) "never odd or even" + + , Just "foo" @=? runRoutes (constRoute "foo") "bar" + , Just "tags/bar.xml" @=? runRoutes (gsubRoute "rss/" (const "")) "tags/rss/bar.xml" , Just "tags/bar.xml" @=? -- cgit v1.2.3