summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-02-20 06:53:33 +0800
committerGitHub <noreply@github.com>2026-02-20 06:53:33 +0800
commite3d46a63375c84b7bd409f1f07ef56eb985eae50 (patch)
tree8abacd32ada06bbeddfb6d707283a7a2dc8e297e /test/functional/vimscript/executable_spec.lua
parent785ac9f2285a413751ce963082469598aa81f74e (diff)
test: start test runners in Xtest_xdg dir (#37964)
This is a better way to prevent parallel tests from interfering with each other, as there are many ways files can be created and deleted in tests, so enforcing different file names is hard. Using $TMPDIR can also work in most cases, but 'backipskip' etc. have special defaults for $TMPDIR. Symlink runtime/, src/, test/ and README.md to Xtest_xdg dir to make tests more convenient (and symlinking test/ is required for busted). Also, use README.md instead of test/README.md in the Ex mode inccommand test, as test/README.md no longer contains 'N' char.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
-rw-r--r--test/functional/vimscript/executable_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/vimscript/executable_spec.lua b/test/functional/vimscript/executable_spec.lua
index 05d249ca32..3840f55e84 100644
--- a/test/functional/vimscript/executable_spec.lua
+++ b/test/functional/vimscript/executable_spec.lua
@@ -20,6 +20,9 @@ describe('executable()', function()
if is_os('win') then
it('exepath respects shellslash', function()
+ -- test/ cannot be a symlink in this test.
+ n.api.nvim_set_current_dir(t.paths.test_source_path)
+
command('let $PATH = fnamemodify("./test/functional/fixtures/bin", ":p")')
eq(
[[test\functional\fixtures\bin\null.CMD]],
@@ -33,6 +36,9 @@ describe('executable()', function()
end)
it('stdpath respects shellslash', function()
+ -- Needs to check paths relative to repo root dir.
+ n.api.nvim_set_current_dir(t.paths.test_source_path)
+
t.matches(
[[build\Xtest_xdg[%w_]*\share\nvim%-data]],
call('fnamemodify', call('stdpath', 'data'), ':.')