mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +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:
@@ -3,16 +3,16 @@ local clear = helpers.clear
|
||||
local eq = helpers.eq
|
||||
local eval = helpers.eval
|
||||
local command = helpers.command
|
||||
local iswin = helpers.iswin
|
||||
local insert = helpers.insert
|
||||
local feed = helpers.feed
|
||||
local is_os = helpers.is_os
|
||||
|
||||
describe('path collapse', function()
|
||||
local targetdir
|
||||
local expected_path
|
||||
|
||||
local function join_path(...)
|
||||
local pathsep = (iswin() and '\\' or '/')
|
||||
local pathsep = (is_os('win') and '\\' or '/')
|
||||
return table.concat({...}, pathsep)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user