aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-09 07:45:21 +0800
committerGitHub <noreply@github.com>2024-08-09 07:45:21 +0800
commitb9913191be0b4884d92db794e2eb92641523a415 (patch)
tree1b2733ebccb2339ee5e5df27658a9adf44f9c43e /test
parenta89088b7a02b70d15ccd6f17402c36f2ff7b7a81 (diff)
parente01ccda1bebf2d420d725478b480740ff45ad6ad (diff)
downloadrneovim-b9913191be0b4884d92db794e2eb92641523a415.tar.gz
rneovim-b9913191be0b4884d92db794e2eb92641523a415.tar.bz2
rneovim-b9913191be0b4884d92db794e2eb92641523a415.zip
Merge pull request #30015 from zeertzjq/vim-8.2.4860
vim-patch: Check NoDefaultCurrentDirectoryInExePath
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