mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
cli: fix default flags when their command equivalents are disabled (#21469)
* always replace `\r\n` with `\n` * fix * test * cleanup * add doc comment
This commit is contained in:
parent
4320f8641b
commit
c0fec31bef
9 changed files with 69 additions and 13 deletions
|
@ -19,12 +19,8 @@ fn test_cli_programs() {
|
|||
has_err = true
|
||||
continue
|
||||
}
|
||||
mut expected_out := os.read_file(out_path)!
|
||||
mut test_out := os.execute('${vexe} run ${test}').output
|
||||
$if windows {
|
||||
expected_out = expected_out.replace('\r\n', '\n')
|
||||
test_out = test_out.replace('\r\n', '\n')
|
||||
}
|
||||
expected_out := os.read_file(out_path)!.replace('\r\n', '\n')
|
||||
test_out := os.execute('${vexe} run ${test}').output.replace('\r\n', '\n')
|
||||
diff_ := diff.compare_text(expected_out, test_out)!
|
||||
if diff_ != '' {
|
||||
println(term.red('FAIL'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue