mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
unittests: avoid using pattern matching on file names
The directory name could contain special characters that trips up the matching used by find. Instead, let's just make sure that the filename starts with the directory name.
This commit is contained in:
@@ -62,7 +62,7 @@ describe('tempfile related functions', function()
|
||||
itp('generate file name in Neovim own temp directory', function()
|
||||
local dir = vim_gettempdir()
|
||||
local file = vim_tempname()
|
||||
assert.truthy(file:find('^' .. dir .. '[^/]*$'))
|
||||
eq(string.sub(file, 1, string.len(dir)), dir)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user