diff options
Diffstat (limited to 'tests/Hakyll')
-rw-r--r-- | tests/Hakyll/Core/Identifier/Tests.hs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/Hakyll/Core/Identifier/Tests.hs b/tests/Hakyll/Core/Identifier/Tests.hs index 2829927..8f534a2 100644 --- a/tests/Hakyll/Core/Identifier/Tests.hs +++ b/tests/Hakyll/Core/Identifier/Tests.hs @@ -13,6 +13,7 @@ import Test.Tasty.HUnit ((@=?)) -------------------------------------------------------------------------------- import Hakyll.Core.Identifier import Hakyll.Core.Identifier.Pattern +import System.FilePath ((</>)) import TestSuite.Util @@ -27,22 +28,21 @@ tests = testGroup "Hakyll.Core.Identifier.Tests" $ concat -------------------------------------------------------------------------------- captureTests :: [TestTree] captureTests = fromAssertions "capture" - [ Just ["bar"] @=? capture "foo/**" "foo/bar" - , Just ["foo/bar"] @=? capture "**" "foo/bar" - , Nothing @=? capture "*" "foo/bar" - , Just [] @=? capture "foo" "foo" - , Just ["foo"] @=? capture "*/bar" "foo/bar" - , Just ["foo/bar"] @=? capture "**/qux" "foo/bar/qux" - , Just ["foo/bar", "qux"] @=? capture "**/*" "foo/bar/qux" - , Just ["foo", "bar/qux"] @=? capture "*/**" "foo/bar/qux" - , Just ["foo"] @=? capture "*.html" "foo.html" - , Nothing @=? capture "*.html" "foo/bar.html" - , Just ["foo/bar"] @=? capture "**.html" "foo/bar.html" - , Just ["foo/bar", "wut"] @=? capture "**/qux/*" "foo/bar/qux/wut" - , Just ["lol", "fun/large"] @=? capture "*cat/**.jpg" "lolcat/fun/large.jpg" - , Just [] @=? capture "\\*.jpg" "*.jpg" - , Nothing @=? capture "\\*.jpg" "foo.jpg" - , Just ["xyz","42"] @=? capture (fromRegex "cat-([a-z]+)/foo([0-9]+).jpg") "cat-xyz/foo42.jpg" + [ Just ["bar"] @=? capture "foo/**" "foo/bar" + , Just ["foo" </> "bar"] @=? capture "**" "foo/bar" + , Nothing @=? capture "*" "foo/bar" + , Just [] @=? capture "foo" "foo" + , Just ["foo"] @=? capture "*/bar" "foo/bar" + , Just ["foo" </> "bar"] @=? capture "**/qux" "foo/bar/qux" + , Just ["foo" </> "bar", "qux"] @=? capture "**/*" "foo/bar/qux" + , Just ["foo", "bar" </> "qux"] @=? capture "*/**" "foo/bar/qux" + , Just ["foo"] @=? capture "*.html" "foo.html" + , Nothing @=? capture "*.html" "foo/bar.html" + , Just ["foo" </> "bar"] @=? capture "**.html" "foo/bar.html" + , Just ["foo" </> "bar", "wut"] @=? capture "**/qux/*" "foo/bar/qux/wut" + , Just ["lol", "fun" </> "large"] @=? capture "*cat/**.jpg" "lolcat/fun/large.jpg" + , Nothing @=? capture "\\*.jpg" "foo.jpg" + , Just ["xyz","42"] @=? capture (fromRegex "cat-([a-z]+)/foo([0-9]+).jpg") "cat-xyz/foo42.jpg" ] |