mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
toml: fix paths in skipped tests for Windows compatibility (#12323)
This commit is contained in:
parent
8014235e0e
commit
5ecaa160a7
@ -59,7 +59,11 @@ fn test_burnt_sushi_tomltest() {
|
||||
mut valid := 0
|
||||
mut e := 0
|
||||
for i, valid_test_file in valid_test_files {
|
||||
relative := valid_test_file.all_after(os.join_path('toml-test', 'tests', 'valid')).trim_left(os.path_separator)
|
||||
mut relative := valid_test_file.all_after(os.join_path('toml-test', 'tests',
|
||||
'valid')).trim_left(os.path_separator)
|
||||
$if windows {
|
||||
relative = relative.replace('/', '\\')
|
||||
}
|
||||
if relative !in valid_exceptions {
|
||||
println('OK [$i/$valid_test_files.len] "$valid_test_file"...')
|
||||
toml_doc := toml.parse_file(valid_test_file) or { panic(err) }
|
||||
@ -89,8 +93,11 @@ fn test_burnt_sushi_tomltest() {
|
||||
mut invalid := 0
|
||||
e = 0
|
||||
for i, invalid_test_file in invalid_test_files {
|
||||
relative := invalid_test_file.all_after(os.join_path('toml-test', 'tests',
|
||||
mut relative := invalid_test_file.all_after(os.join_path('toml-test', 'tests',
|
||||
'invalid')).trim_left(os.path_separator)
|
||||
$if windows {
|
||||
relative = relative.replace('/', '\\')
|
||||
}
|
||||
if relative !in invalid_exceptions {
|
||||
println('OK [$i/$invalid_test_files.len] "$invalid_test_file"...')
|
||||
if toml_doc := toml.parse_file(invalid_test_file) {
|
||||
|
Loading…
Reference in New Issue
Block a user