mirror of
https://github.com/neovim/neovim.git
synced 2025-12-05 22:22:44 +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:
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
local eq = helpers.eq
|
||||
local clear = helpers.clear
|
||||
local funcs = helpers.funcs
|
||||
local iswin = helpers.iswin
|
||||
local is_os = helpers.is_os
|
||||
|
||||
describe('has()', function()
|
||||
before_each(clear)
|
||||
@@ -51,7 +51,7 @@ describe('has()', function()
|
||||
end)
|
||||
|
||||
it('"unnamedplus"', function()
|
||||
if (not iswin()) and funcs.has("clipboard") == 1 then
|
||||
if (not is_os('win')) and funcs.has("clipboard") == 1 then
|
||||
eq(1, funcs.has("unnamedplus"))
|
||||
else
|
||||
eq(0, funcs.has("unnamedplus"))
|
||||
|
||||
Reference in New Issue
Block a user