From 9656e78869dd8248a8558671a48d2e52dbe7edb5 Mon Sep 17 00:00:00 2001 From: "Laurent P. René de Cotret" Date: Wed, 27 May 2020 06:16:47 -0400 Subject: Fix for filepath matching on Windows --- tests/Hakyll/Core/Identifier/Tests.hs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests') 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" ] -- cgit v1.2.3