Move test case.

This commit is contained in:
Dillon Kearns 2022-03-04 09:05:35 -08:00
parent 0688e579dd
commit 8adac30f30
2 changed files with 10 additions and 24 deletions

View File

@ -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")

View File

@ -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