regex: uniform const field names to snake_case

pull/4984/head
yuyi 2020-05-22 05:33:51 +08:00 committed by GitHub
parent f2ea8ca62c
commit 2f171bf5d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 233 additions and 234 deletions

File diff suppressed because it is too large Load Diff

View File

@ -178,7 +178,7 @@ fn test_regex(){
mut re, re_err, _ := regex.regex(to.q)
re.group_csave = [-1].repeat(3*20+1)
if re_err == regex.COMPILE_OK {
if re_err == regex.compile_ok {
start, end := re.match_string(to.src)
mut tmp_str := ""
@ -226,7 +226,7 @@ fn test_regex(){
//println("#$c [$to.src] q[$to.q] $to.r")
mut re, re_err, err_pos := regex.regex(to.q)
if re_err == regex.COMPILE_OK {
if re_err == regex.compile_ok {
res := re.find_all(to.src)
if res.len != to.r.len {
println("ERROR: find_all, array of different size.")
@ -256,7 +256,7 @@ fn test_regex(){
//println("#$c [$to.src] q[$to.q] $to.r")
mut re, re_err, err_pos := regex.regex(to.q)
if re_err == regex.COMPILE_OK {
if re_err == regex.compile_ok {
res := re.replace(to.src,to.rep)
if res != to.r {
println("ERROR: replace.")
@ -281,7 +281,7 @@ fn test_regex(){
// test the find
if to.s > 0 {
mut re, re_err, err_pos := regex.regex(to.q)
if re_err == regex.COMPILE_OK {
if re_err == regex.compile_ok {
//q_str := re.get_query()
//println("Query: $q_str")
start,end := re.find(to.src)
@ -312,7 +312,7 @@ fn test_regex(){
//re.debug = true
re_err,err_pos := re.compile(to.q)
if re_err == regex.COMPILE_OK {
if re_err == regex.compile_ok {
//println("#$c [$to.src] q[$to.q]")
start, end := re.match_string(to.src)
@ -349,4 +349,3 @@ fn test_regex(){
}
}
}