diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-05-29 23:39:07 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-05-29 23:39:07 +0200 |
commit | a27e254e0b1f9359653aa378565cc867049342e2 (patch) | |
tree | b019f605737f7db47950750ea4272b66f4640cc0 /tests/Hakyll/Core | |
parent | b182541b587a1d79d7c3794afadb41de9907a70d (diff) | |
download | hakyll-a27e254e0b1f9359653aa378565cc867049342e2.tar.gz |
Add constRoute
Closes #67
Diffstat (limited to 'tests/Hakyll/Core')
-rw-r--r-- | tests/Hakyll/Core/Routes/Tests.hs | 6 |
1 files changed, 6 insertions, 0 deletions
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" @=? |