aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-09 06:57:17 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-08-09 07:21:59 +0800
commit336ab2682e08b95c51b8cbafcf9697b5a42026d1 (patch)
tree11d15b544bd6aeb846d13c6b237a6bb29973c530 /test
parenta89088b7a02b70d15ccd6f17402c36f2ff7b7a81 (diff)
downloadrneovim-336ab2682e08b95c51b8cbafcf9697b5a42026d1.tar.gz
rneovim-336ab2682e08b95c51b8cbafcf9697b5a42026d1.tar.bz2
rneovim-336ab2682e08b95c51b8cbafcf9697b5a42026d1.zip
vim-patch:8.2.4860: MS-Windows: always uses current directory for executables
Problem: MS-Windows: always uses current directory for executables. Solution: Check the NoDefaultCurrentDirectoryInExePath environment variable. (Yasuhiro Matsumoto, closes vim/vim#10341) https://github.com/vim/vim/commit/05cf63e9bdca1ac070df3e7d9c6dfc45e68ac916 Omit doc change: override in later doc update. Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_functions.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index 29bec72f2b..df4c6b1556 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -3578,6 +3578,24 @@ func Test_isabsolutepath()
endif
endfunc
+" Test for exepath()
+func Test_exepath()
+ if has('win32')
+ call assert_notequal(exepath('cmd'), '')
+
+ let oldNoDefaultCurrentDirectoryInExePath = $NoDefaultCurrentDirectoryInExePath
+ call writefile(['@echo off', 'echo Evil'], 'vim-test-evil.bat')
+ let $NoDefaultCurrentDirectoryInExePath = ''
+ call assert_notequal(exepath("vim-test-evil.bat"), '')
+ let $NoDefaultCurrentDirectoryInExePath = '1'
+ call assert_equal(exepath("vim-test-evil.bat"), '')
+ let $NoDefaultCurrentDirectoryInExePath = oldNoDefaultCurrentDirectoryInExePath
+ call delete('vim-test-evil.bat')
+ else
+ call assert_notequal(exepath('sh'), '')
+ endif
+endfunc
+
" Test for virtcol()
func Test_virtcol()
new