mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 14:25:32 +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:
@@ -12,7 +12,6 @@ local skip = t.skip
|
||||
-- events which can happen with some backends on some platforms
|
||||
local function touch(path)
|
||||
local tmp = t.tmpname()
|
||||
io.open(tmp, 'w'):close()
|
||||
assert(vim.uv.fs_rename(tmp, path))
|
||||
end
|
||||
|
||||
@@ -42,7 +41,7 @@ describe('vim._watch', function()
|
||||
)
|
||||
end
|
||||
|
||||
local root_dir = vim.uv.fs_mkdtemp(vim.fs.dirname(t.tmpname()) .. '/nvim_XXXXXXXXXX')
|
||||
local root_dir = vim.uv.fs_mkdtemp(vim.fs.dirname(t.tmpname(false)) .. '/nvim_XXXXXXXXXX')
|
||||
|
||||
local expected_events = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user