mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-31 03:03:05 -07:00
review fixes; add submatch support to glob
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user