mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
regex: fixes and optimizations (#7431)
This commit is contained in:
@ -138,6 +138,9 @@ match_test_suite = [
|
||||
TestItem{"*1*1(", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",0,5},
|
||||
TestItem{" 1*1(", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",-1,0},
|
||||
TestItem{"1*1 ", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",-1,0},
|
||||
|
||||
// particular groups
|
||||
TestItem{"ababababac", r"ab(.*)(ac)",0,10},
|
||||
]
|
||||
)
|
||||
|
||||
@ -229,6 +232,12 @@ cgroups_test_suite = [
|
||||
[0, 3, 4, 5, 5, 7],
|
||||
map[string]int{}
|
||||
},
|
||||
TestItemCGroup{
|
||||
"ababababac",
|
||||
r"ab(.*)(ac)",0,10,
|
||||
[2, 8, 8, 10],
|
||||
map[string]int{}
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user