mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 03:24:49 +00:00
test: tmpname(create:boolean) #30242
Problem:
137f98cf64 added the `create` parameter to `tmpname()` but didn't
fully implement it.
Solution:
- Update impl for the `os.tmpname()` codepath.
- Inspect all usages of `tmpname()`, update various tests.
This commit is contained in:
@@ -8,7 +8,6 @@ local exec_lua = n.exec_lua
|
||||
local fn = n.fn
|
||||
local nvim_prog = n.nvim_prog
|
||||
local matches = t.matches
|
||||
local write_file = t.write_file
|
||||
local tmpname = t.tmpname
|
||||
local eq = t.eq
|
||||
local pesc = vim.pesc
|
||||
@@ -226,7 +225,6 @@ describe(':Man', function()
|
||||
local actual_file = tmpname()
|
||||
-- actual_file must be an absolute path to an existent file for us to test against it
|
||||
matches('^/.+', actual_file)
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user