test(plugin/man_spec): use pesc() on actual_file in pattern

This commit is contained in:
zeertzjq 2023-09-17 05:47:36 +08:00
parent 28f54a7878
commit 8f1e344339

View File

@ -9,6 +9,7 @@ local matches = helpers.matches
local write_file = helpers.write_file
local tmpname = helpers.tmpname
local eq = helpers.eq
local pesc = helpers.pesc
local skip = helpers.skip
local is_ci = helpers.is_ci
@ -189,7 +190,7 @@ describe(':Man', function()
write_file(actual_file, '')
local args = {nvim_prog, '--headless', '+:Man ' .. actual_file, '+q'}
matches(('Error detected while processing command line:\r\n' ..
'man.lua: "no manual entry for %s"'):format(actual_file),
'man.lua: "no manual entry for %s"'):format(pesc(actual_file)),
funcs.system(args, {''}))
os.remove(actual_file)
end)