parent
22b3e9df27
commit
c0a47f7e22
6 changed files with 126 additions and 87 deletions
|
|
@ -10,9 +10,9 @@ suite "match":
|
|||
check("abc".match(re"(\w)").captures[0] == "a")
|
||||
check("abc".match(re"(?<letter>\w)").captures["letter"] == "a")
|
||||
check("abc".match(re"(\w)\w").captures[-1] == "ab")
|
||||
check("abc".match(re"(\w)").captureBounds[0].get == 0 .. 0)
|
||||
check("abc".match(re"").captureBounds[-1].get == 0 .. -1)
|
||||
check("abc".match(re"abc").captureBounds[-1].get == 0 .. 2)
|
||||
check("abc".match(re"(\w)").captureBounds[0] == 0 .. 0)
|
||||
check("abc".match(re"").captureBounds[-1] == 0 .. -1)
|
||||
check("abc".match(re"abc").captureBounds[-1] == 0 .. 2)
|
||||
|
||||
test "match test cases":
|
||||
check("123".match(re"").matchBounds == 0 .. -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue