comparison src/testdir/test_functions.vim @ 28672:e4de5b5193b4 v8.2.4860

patch 8.2.4860: MS-Windows: always uses current directory for executables Commit: https://github.com/vim/vim/commit/05cf63e9bdca1ac070df3e7d9c6dfc45e68ac916 Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> Date: Tue May 3 11:02:28 2022 +0100 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 #10341)
author Bram Moolenaar <Bram@vim.org>
date Tue, 03 May 2022 12:15:04 +0200
parents 53c608c7ea9e
children 99729fe344f7
comparison
equal deleted inserted replaced
28671:5865b00cca76 28672:e4de5b5193b4
2904 call assert_true(isabsolutepath('/')) 2904 call assert_true(isabsolutepath('/'))
2905 call assert_true(isabsolutepath('/usr/share/')) 2905 call assert_true(isabsolutepath('/usr/share/'))
2906 endif 2906 endif
2907 endfunc 2907 endfunc
2908 2908
2909 " Test for exepath()
2910 func Test_exepath()
2911 if has('win32')
2912 call assert_notequal(exepath('cmd'), '')
2913
2914 let oldNoDefaultCurrentDirectoryInExePath = $NoDefaultCurrentDirectoryInExePath
2915 call writefile(['@echo off', 'echo Evil'], 'vim-test-evil.bat')
2916 let $NoDefaultCurrentDirectoryInExePath = ''
2917 call assert_notequal(exepath("vim-test-evil.bat"), '')
2918 let $NoDefaultCurrentDirectoryInExePath = '1'
2919 call assert_equal(exepath("vim-test-evil.bat"), '')
2920 let $NoDefaultCurrentDirectoryInExePath = oldNoDefaultCurrentDirectoryInExePath
2921 call delete('vim-test-evil.bat')
2922 else
2923 call assert_notequal(exepath('sh'), '')
2924 endif
2925 endfunc
2926
2909 " vim: shiftwidth=2 sts=2 expandtab 2927 " vim: shiftwidth=2 sts=2 expandtab