Move test case to end-to-end suite.

This commit is contained in:
Dillon Kearns 2022-03-04 09:12:06 -08:00
parent 2639d1333d
commit bfffe9e43b
4 changed files with 14 additions and 12 deletions

View File

@ -197,6 +197,20 @@ all =
, expected =
[ "greeting.txt" ]
}
, globTestCase
{ name = "wildcard and recursiveWildcard in one pattern"
, glob =
Glob.succeed Tuple.pair
|> Glob.match (Glob.literal "glob-test-cases/content/")
|> Glob.capture Glob.recursiveWildcard
|> Glob.match (Glob.literal "/")
|> Glob.capture Glob.wildcard
|> Glob.match (Glob.literal ".md")
, expected =
[ ( [], "about" )
, ( [ "community" ], "meetups" )
]
}
]
|> DataSource.combine
|> DataSource.map (describe "glob tests")

View File

@ -65,18 +65,6 @@ all =
{ expectedMatch = ( [ "a", "b", "c" ], "d" )
, expectedPattern = "**/*.txt"
}
, test "wildcard and recursiveWildcard in one pattern" <|
\() ->
Glob.succeed Tuple.pair
|> Glob.match (Glob.literal "content/")
|> Glob.capture Glob.recursiveWildcard
|> Glob.match (Glob.literal "/")
|> Glob.capture Glob.wildcard
|> Glob.match (Glob.literal ".md")
|> expectAll
[ ( "content/about.md", ( [], "about" ) )
, ( "content/community/meetups.md", ( [ "community" ], "meetups" ) )
]
]