fix: failing XDG test on Windows CI

Problem:
Failing Windows CI:
    FAILED   test/functional\options\defaults_spec.lua @ 361: XDG defaults with too long XDG variables are correctly set
    test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: /X/X/X" not found in log (last 10 lines): Xtest-defaults-log:
    FAILED   test/functional\options\defaults_spec.lua @ 435: XDG defaults with XDG variables that can be expanded are not expanded
    test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: %$XDG_RUNTIME_DIR%/" not found in log (last 10 lines): Xtest-defaults-log:

Solution:
The assert_log() statements are not relevant on Windows, because there
XDG_RUNTIME_DIR is not used for creating servers, it uses \\.pipe\….
This commit is contained in:
Justin M. Keyes 2023-01-17 01:54:35 +01:00
parent f72cb97fa0
commit 6c2f02cbd0

View File

@ -359,7 +359,9 @@ describe('XDG defaults', function()
end)
it('are correctly set', function()
assert_log('Failed to start server: no such file or directory: /X/X/X', testlog, 10)
if not is_os('win') then
assert_log('Failed to start server: no such file or directory: /X/X/X', testlog, 10)
end
local vimruntime, libdir = vimruntime_and_libdir()
@ -433,7 +435,9 @@ describe('XDG defaults', function()
end)
it('are not expanded', function()
assert_log('Failed to start server: no such file or directory: %$XDG_RUNTIME_DIR%/', testlog, 10)
if not is_os('win') then
assert_log('Failed to start server: no such file or directory: %$XDG_RUNTIME_DIR%/', testlog, 10)
end
local vimruntime, libdir = vimruntime_and_libdir()
eq((('$XDG_DATA_HOME/nvim'