diff --git a/examples/end-to-end/src/Test/Glob.elm b/examples/end-to-end/src/Test/Glob.elm index df9d24fa..4fbce8c7 100644 --- a/examples/end-to-end/src/Test/Glob.elm +++ b/examples/end-to-end/src/Test/Glob.elm @@ -179,6 +179,16 @@ all = , expected = [ "README.md" ] } + , globTestCase + { name = "withFilePath" + , glob = + Glob.succeed identity + |> Glob.captureFilePath + |> Glob.match Glob.wildcard + |> Glob.match (Glob.literal ".txt") + , expected = + [ "greeting.txt" ] + } ] |> DataSource.combine |> DataSource.map (describe "glob tests") diff --git a/tests/GlobTests.elm b/tests/GlobTests.elm index 0b19a8b0..3f6bf331 100644 --- a/tests/GlobTests.elm +++ b/tests/GlobTests.elm @@ -53,21 +53,6 @@ all = |> expectAll [ ( "capture/match", "capture" ) ] - , test "oneOf with empty" <| - \() -> - Glob.succeed Tuple.pair - |> Glob.capture Glob.wildcard - |> Glob.capture - (Glob.oneOf - ( ( "/index", WithIndex ) - , [ ( "", NoIndex ) - ] - ) - ) - |> expectAll - [ ( "hello/index", ( "hello", WithIndex ) ) - , ( "hello", ( "hello", NoIndex ) ) - ] , test "at least one" <| \() -> Glob.succeed identity @@ -85,15 +70,6 @@ all = { expectedMatch = ( Json, [ Yml, Json, Json ] ) , expectedPattern = "*.+(yml|json)" } - , test "withFilePath" <| - \() -> - Glob.succeed identity - |> Glob.captureFilePath - |> Glob.match Glob.wildcard - |> Glob.match (Glob.literal ".txt") - |> expectAll - [ ( "hello.txt", "hello.txt" ) - ] , test "optional group - no match" <| \() -> zeroOrMoreGlob