mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
regex: code cleaning, add more tests (#7402)
* added carsywulf tests to the suite, removed deprecated repeat for init arrays * some clean in the code, fix typo in README.md
This commit is contained in:
@ -128,6 +128,16 @@ match_test_suite = [
|
||||
TestItem{"[ an s. s! ]( wi4ki:something )", r"\[.*\]\( *(\w*:*\w+) *\)",0,31},
|
||||
TestItem{"[ an s. s! ](wiki:something)", r"\[.*\]\( *(\w*:*\w+) *\)",0,28},
|
||||
|
||||
// Crazywulf tests (?:^|[()])(\d+)(*)(\d+)(?:$|[()])
|
||||
TestItem{"1*1", r"(\d+)([*])(\d+)",0,3},
|
||||
TestItem{"+1*1", r"^(\d+)([*])(\d+)",-1,0},
|
||||
TestItem{"*1*1", r"(?:^|[*])(\d+)([*])(\d+)",0,4},
|
||||
TestItem{"*1*1", r"(?:^|[*()])(\d+)([*])(\d+)",0,4},
|
||||
TestItem{")1*1", r"(?:^|[*()])(\d+)([*])(\d+)",0,4},
|
||||
TestItem{"(1*1", r"(?:^|[*()])(\d+)([*])(\d+)",0,4},
|
||||
TestItem{"*1*1(", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",0,5},
|
||||
TestItem{" 1*1(", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",-1,0},
|
||||
TestItem{"1*1 ", r"(?:^|[*()])(\d+)([*])(\d+)(?:$|[*()])",-1,0},
|
||||
]
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user