mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
review fixes; add submatch support to glob
This commit is contained in:
parent
5ae6f6b927
commit
c92192ef48
12 changed files with 97 additions and 75 deletions
|
|
@ -29,9 +29,20 @@ func TestGlob(t *testing.T) {
|
|||
assertMatches("*://*.oragono.io", "https://testnet.oragono.io", true, t)
|
||||
assertMatches("*://*.oragono.io", "https://oragono.io", false, t)
|
||||
assertMatches("*://*.oragono.io", "https://githubusercontent.com", false, t)
|
||||
assertMatches("*://*.oragono.io", "https://testnet.oragono.io.example.com", false, t)
|
||||
|
||||
assertMatches("", "", true, t)
|
||||
assertMatches("", "x", false, t)
|
||||
assertMatches("*", "", true, t)
|
||||
assertMatches("*", "x", true, t)
|
||||
|
||||
assertMatches("c?b", "cab", true, t)
|
||||
assertMatches("c?b", "cub", true, t)
|
||||
assertMatches("c?b", "cb", false, t)
|
||||
assertMatches("c?b", "cube", false, t)
|
||||
assertMatches("?*", "cube", true, t)
|
||||
assertMatches("?*", "", false, t)
|
||||
|
||||
assertMatches("S*e", "Skåne", true, t)
|
||||
assertMatches("Sk?ne", "Skåne", true, t)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue