1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

regex: small fixes, '-' minus to char classes, remove all C.printf

This commit is contained in:
penguindark
2020-05-16 17:11:13 +02:00
committed by GitHub
parent 57dd26650c
commit 48659f4145
3 changed files with 85 additions and 76 deletions

View File

@@ -72,6 +72,8 @@ match_test_suite = [
TestItem{" pippo pera",r"\s(.*)pe(.*)",0,11},
TestItem{" abb",r"\s(.*)",0,4},
TestItem{"/home/us_er/pippo/info-01.txt", r"(/?[-\w_]+)*\.txt$",0,29}
// negative
TestItem{"zthis ciao",r"((t[hieo]+se?)\s*)+",-1,0},
@@ -81,6 +83,7 @@ match_test_suite = [
TestItem{"this cpapaz adce aabe third",r"(c(pa)+z)(\s[\a]+){2}$",-1,0},
TestItem{"1234this cpapaz adce aabe ter",r"(c(pa)+z)(\s[\a]+){2}$",-1,0},
TestItem{"cpapaz ole. pipipo,",r"^.*c.+ol?e.*p([ip])+o$",-1,0},
TestItem{"/home/us_er/pippo/info-01.jpeg", r"(/?[-\w_]+)*\.txt$",-1,0}
// check unicode
TestItem{"this is a test",r".*a [-Ⅵ ]+",0,34},
@@ -94,7 +97,6 @@ struct TestItemFa {
r []int
}
const (
match_test_suite_fa = [
// find_all tests