Expose the pattern string, rename some procs
This commit is contained in:
parent
d7dbf7e011
commit
fb51221aa8
1 changed files with 12 additions and 11 deletions
|
|
@ -37,8 +37,7 @@ suite "captures":
|
|||
test "capture count":
|
||||
let ex1 = initRegex("(?<foo>foo)(?<bar>bar)?")
|
||||
check(ex1.captureCount == 2)
|
||||
# Don't have sets, do this :<
|
||||
check(ex1.captureNames == @["foo", "bar"] or ex1.captureNames == @["bar", "foo"])
|
||||
check(ex1.captureNameId == {"foo" : 0, "bar" : 1}.toTable())
|
||||
|
||||
test "named capture table":
|
||||
let ex1 = initRegex("(?<foo>foo)(?<bar>bar)?").match("foo").get
|
||||
|
|
|
|||
Loading…
Reference in a new issue