mirror of
https://github.com/dillonkearns/elm-pages.git
synced 2024-09-11 09:05:28 +03:00
Add some test cases for glob with leading "./".
This commit is contained in:
parent
f80c7e48f8
commit
878c5eda17
@ -53,6 +53,27 @@ all =
|
||||
}
|
||||
]
|
||||
}
|
||||
, globTestCase
|
||||
{ name = "5 with leading ./"
|
||||
, glob =
|
||||
Glob.succeed
|
||||
(\first second wildcardPart ->
|
||||
{ first = first
|
||||
, second = second
|
||||
, wildcard = wildcardPart
|
||||
}
|
||||
)
|
||||
|> Glob.match (Glob.literal "./")
|
||||
|> 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 =
|
||||
@ -61,6 +82,15 @@ all =
|
||||
|> Glob.match (Glob.literal ".md")
|
||||
, expected = [ "README" ]
|
||||
}
|
||||
, globTestCase
|
||||
{ name = "capture with leading ./"
|
||||
, glob =
|
||||
Glob.succeed identity
|
||||
|> Glob.match (Glob.literal "./")
|
||||
|> Glob.capture Glob.wildcard
|
||||
|> Glob.match (Glob.literal ".md")
|
||||
, expected = [ "README" ]
|
||||
}
|
||||
, globTestCase
|
||||
{ name = "oneOf"
|
||||
, glob =
|
||||
|
Loading…
Reference in New Issue
Block a user