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

os: make find_abs_path_of_executable_test.v more robust (fix #15459)

This commit is contained in:
Delyan Angelov 2022-08-20 10:06:58 +03:00
parent 6062708c60
commit 5cba5920d5
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -39,6 +39,7 @@ fn test_find_abs_path_of_executable() ? {
dump(fpath)
//
setenv('PATH', original_path, true)
chdir(home_dir())? // change to a *completely* different folder, to avoid the original PATH containing `.`
if x := find_abs_path_of_executable('myclang') {
eprintln('> find_abs_path_of_executable should have failed, but instead it found: $x')
assert false