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_expand.vim b/src/testdir/test_expand.vim
index 53f753d..48dce25 100644
--- a/src/testdir/test_expand.vim
+++ b/src/testdir/test_expand.vim
@@ -35,7 +35,7 @@
call assert_true(isdirectory('Xdir ~ dir'))
cd Xdir\ ~\ dir
call assert_true(getcwd() =~ 'Xdir \~ dir')
- exe 'cd ' . fnameescape(dir)
+ call chdir(dir)
call delete('Xdir ~ dir', 'd')
call assert_false(isdirectory('Xdir ~ dir'))
endfunc