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

use trimmed output for comparison (#15032)

This commit is contained in:
Subhomoy Haldar 2022-07-12 01:17:32 +05:30 committed by GitHub
parent fbad48b5d9
commit dc68469818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,17 +39,17 @@ fn test_conditional_executable_removal() ? {
original_file_list := os.ls(dir)?
new_file_list := arrays.concat(original_file_list, executable)
assert os.execute('${os.quoted_path(@VEXE)} run .').output == 'Hello World!\n'
assert os.execute('${os.quoted_path(@VEXE)} run .').output.trim_space() == 'Hello World!'
assert arrays_are_equivalent(os.ls(dir)?, original_file_list)
assert os.execute('${os.quoted_path(@VEXE)} .').output == ''
assert os.execute('./$executable').output == 'Hello World!\n'
assert os.execute('./$executable').output.trim_space() == 'Hello World!'
assert arrays_are_equivalent(os.ls(dir)?, new_file_list)
assert os.execute('${os.quoted_path(@VEXE)} run .').output == 'Hello World!\n'
assert os.execute('${os.quoted_path(@VEXE)} run .').output.trim_space() == 'Hello World!'
assert arrays_are_equivalent(os.ls(dir)?, new_file_list)
}