mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
test: simplify platform detection (#21020)
Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
This commit is contained in:
@@ -5,7 +5,7 @@ local eq = helpers.eq
|
||||
local clear = helpers.clear
|
||||
local command = helpers.command
|
||||
local pathsep = helpers.get_pathsep()
|
||||
local iswin = helpers.iswin()
|
||||
local is_os = helpers.is_os
|
||||
local curbufmeths = helpers.curbufmeths
|
||||
local exec_lua = helpers.exec_lua
|
||||
local feed_command = helpers.feed_command
|
||||
@@ -18,7 +18,7 @@ describe('vim.secure', function()
|
||||
local xstate = 'Xstate'
|
||||
|
||||
setup(function()
|
||||
helpers.mkdir_p(xstate .. pathsep .. (iswin and 'nvim-data' or 'nvim'))
|
||||
helpers.mkdir_p(xstate .. pathsep .. (is_os('win') and 'nvim-data' or 'nvim'))
|
||||
end)
|
||||
|
||||
teardown(function()
|
||||
|
Reference in New Issue
Block a user