mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +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:
@@ -9,12 +9,12 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
|
||||
local clear = helpers.clear
|
||||
local eval = helpers.eval
|
||||
local iswin = helpers.iswin
|
||||
local matches = helpers.matches
|
||||
local is_os = helpers.is_os
|
||||
|
||||
before_each(clear)
|
||||
|
||||
it('windowsversion()', function()
|
||||
clear()
|
||||
matches(iswin() and '^%d+%.%d+$' or '^$', eval('windowsversion()'))
|
||||
matches(is_os('win') and '^%d+%.%d+$' or '^$', eval('windowsversion()'))
|
||||
end)
|
||||
|
Reference in New Issue
Block a user