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:
parent
6062708c60
commit
5cba5920d5
|
@ -39,6 +39,7 @@ fn test_find_abs_path_of_executable() ? {
|
||||||
dump(fpath)
|
dump(fpath)
|
||||||
//
|
//
|
||||||
setenv('PATH', original_path, true)
|
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') {
|
if x := find_abs_path_of_executable('myclang') {
|
||||||
eprintln('> find_abs_path_of_executable should have failed, but instead it found: $x')
|
eprintln('> find_abs_path_of_executable should have failed, but instead it found: $x')
|
||||||
assert false
|
assert false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user