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:
dundargoc
2022-11-22 01:13:30 +01:00
committed by GitHub
parent 7c10774860
commit 5eb5f49488
74 changed files with 346 additions and 347 deletions

View File

@@ -5,7 +5,7 @@ local eval, eq = helpers.eval, helpers.eq
local command = helpers.command
local nvim = helpers.nvim
local exc_exec = helpers.exc_exec
local iswin = helpers.iswin
local is_os = helpers.is_os
describe('msgpack*() functions', function()
before_each(clear)
@@ -467,7 +467,7 @@ describe('msgpackparse() function', function()
eval(cmd)
eval(cmd) -- do it again (try to force segfault)
local api_info = eval(cmd) -- do it again
if iswin() then
if is_os('win') then
helpers.assert_alive()
pending('msgpackparse() has a bug on windows')
return