Add test case for capturing leading "./".

This commit is contained in:
Dillon Kearns 2024-04-25 10:07:15 -07:00
parent 6df31fa436
commit 6a32e56136

View File

@ -74,6 +74,26 @@ all =
}
]
}
, globTestCase
{ name = "capture leading ./"
, glob =
Glob.succeed
(\first second wildcardPart ->
{ first = first
, second = second
, wildcard = wildcardPart
}
)
|> Glob.capture (Glob.literal "./glob-test-cases/")
|> Glob.capture (Glob.literal "content1/")
|> Glob.capture Glob.wildcard
, expected =
[ { first = "./glob-test-cases/"
, second = "content1/"
, wildcard = "about.md"
}
]
}
, globTestCase
{ name = "capture"
, glob =