patch 8.1.2278: using "cd" with "exe" may fail
Problem: Using "cd" with "exe" may fail.
Solution: Use chdir() instead.
diff --git a/src/testdir/test_findfile.vim b/src/testdir/test_findfile.vim
index 5cda2ea..2e6f888 100644
--- a/src/testdir/test_findfile.vim
+++ b/src/testdir/test_findfile.vim
@@ -113,7 +113,7 @@
call assert_match('.*/Xdir1/bar', findfile('bar', '**;', 2))
bwipe!
- exe 'cd ' . save_dir
+ call chdir(save_dir)
call CleanFiles()
let &path = save_path
let &shellslash = save_shellslash
@@ -170,7 +170,7 @@
call assert_match('.*/Xdir1/Xdir2', finddir('Xdir2', '**;', 2))
call assert_equal('Xdir3', finddir('Xdir3', '**;', 1))
- exe 'cd ' . save_dir
+ call chdir(save_dir)
call CleanFiles()
let &path = save_path
let &shellslash = save_shellslash