mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
regex: uniform const field names to snake_case
This commit is contained in:
parent
f2ea8ca62c
commit
2f171bf5d9
File diff suppressed because it is too large
Load Diff
@ -178,7 +178,7 @@ fn test_regex(){
|
|||||||
mut re, re_err, _ := regex.regex(to.q)
|
mut re, re_err, _ := regex.regex(to.q)
|
||||||
re.group_csave = [-1].repeat(3*20+1)
|
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)
|
start, end := re.match_string(to.src)
|
||||||
|
|
||||||
mut tmp_str := ""
|
mut tmp_str := ""
|
||||||
@ -226,7 +226,7 @@ fn test_regex(){
|
|||||||
//println("#$c [$to.src] q[$to.q] $to.r")
|
//println("#$c [$to.src] q[$to.q] $to.r")
|
||||||
|
|
||||||
mut re, re_err, err_pos := regex.regex(to.q)
|
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)
|
res := re.find_all(to.src)
|
||||||
if res.len != to.r.len {
|
if res.len != to.r.len {
|
||||||
println("ERROR: find_all, array of different size.")
|
println("ERROR: find_all, array of different size.")
|
||||||
@ -256,7 +256,7 @@ fn test_regex(){
|
|||||||
//println("#$c [$to.src] q[$to.q] $to.r")
|
//println("#$c [$to.src] q[$to.q] $to.r")
|
||||||
|
|
||||||
mut re, re_err, err_pos := regex.regex(to.q)
|
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)
|
res := re.replace(to.src,to.rep)
|
||||||
if res != to.r {
|
if res != to.r {
|
||||||
println("ERROR: replace.")
|
println("ERROR: replace.")
|
||||||
@ -281,7 +281,7 @@ fn test_regex(){
|
|||||||
// test the find
|
// test the find
|
||||||
if to.s > 0 {
|
if to.s > 0 {
|
||||||
mut re, re_err, err_pos := regex.regex(to.q)
|
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()
|
//q_str := re.get_query()
|
||||||
//println("Query: $q_str")
|
//println("Query: $q_str")
|
||||||
start,end := re.find(to.src)
|
start,end := re.find(to.src)
|
||||||
@ -312,7 +312,7 @@ fn test_regex(){
|
|||||||
//re.debug = true
|
//re.debug = true
|
||||||
|
|
||||||
re_err,err_pos := re.compile(to.q)
|
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]")
|
//println("#$c [$to.src] q[$to.q]")
|
||||||
start, end := re.match_string(to.src)
|
start, end := re.match_string(to.src)
|
||||||
|
|
||||||
@ -349,4 +349,3 @@ fn test_regex(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user