test: normalize test filepath #35983

Problem:
Inconsistet slashes in Windows CI:

    ERROR test/functional\ex_cmds\mksession_spec.lua @ 36: ...

Solution:
Normalize the slashes.

    ERROR test/functional/ex_cmds/mksession_spec.lua @ 36: ...
This commit is contained in:
Justin M. Keyes
2025-10-01 22:08:10 -04:00
committed by GitHub
parent d72c805e87
commit 237827a0da

View File

@@ -140,10 +140,8 @@ return function(options)
local getFileLine = function(element) local getFileLine = function(element)
local fileline = '' local fileline = ''
if element.trace or element.trace.short_src then if element.trace or element.trace.short_src then
fileline = colors.cyan(element.trace.short_src) local fname = vim.fs.normalize(element.trace.short_src)
.. ' @ ' fileline = colors.cyan(fname) .. ' @ ' .. colors.cyan(element.trace.currentline) .. ': '
.. colors.cyan(element.trace.currentline)
.. ': '
end end
return fileline return fileline
end end