mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: fix diff.color_compare_strings parameter order in test files, to make analysing the results easier
This commit is contained in:
parent
112a1278bb
commit
1c2b4e76dc
@ -71,7 +71,7 @@ fn print_compare(expected string, found string) {
|
|||||||
println(found)
|
println(found)
|
||||||
println('============\n')
|
println('============\n')
|
||||||
println('diff:')
|
println('diff:')
|
||||||
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
|
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
|
||||||
println('============\n')
|
println('============\n')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ fn check_path(vexe string, dir string, tests []string) int {
|
|||||||
println(found)
|
println(found)
|
||||||
println('============\n')
|
println('============\n')
|
||||||
println('diff:')
|
println('diff:')
|
||||||
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
|
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
|
||||||
println('============\n')
|
println('============\n')
|
||||||
nb_fail++
|
nb_fail++
|
||||||
} else {
|
} else {
|
||||||
|
@ -362,10 +362,10 @@ fn clean_line_endings(s string) string {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
fn diff_content(s1 string, s2 string) {
|
fn diff_content(expected string, found string) {
|
||||||
diff_cmd := diff.find_working_diff_command() or { return }
|
diff_cmd := diff.find_working_diff_command() or { return }
|
||||||
println(term.bold(term.yellow('diff: ')))
|
println(term.bold(term.yellow('diff: ')))
|
||||||
println(diff.color_compare_strings(diff_cmd, rand.ulid(), s1, s2))
|
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
|
||||||
println('============\n')
|
println('============\n')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ fn check_path(dir string, tests []string) !int {
|
|||||||
println(found)
|
println(found)
|
||||||
println('============\n')
|
println('============\n')
|
||||||
println('diff:')
|
println('diff:')
|
||||||
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
|
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
|
||||||
println('============\n')
|
println('============\n')
|
||||||
nb_fail++
|
nb_fail++
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user