mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 22:35:33 +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 clear = helpers.clear
|
||||
local exec_lua = helpers.exec_lua
|
||||
local eq = helpers.eq
|
||||
local iswin = helpers.iswin
|
||||
local is_os = helpers.is_os
|
||||
local skip = helpers.skip
|
||||
local write_file = require('test.helpers').write_file
|
||||
|
||||
@@ -169,7 +169,7 @@ describe('URI methods', function()
|
||||
|
||||
describe('uri from bufnr', function()
|
||||
it('Windows paths should not be treated as uris', function()
|
||||
skip(not iswin(), "Not applicable on non-Windows")
|
||||
skip(not is_os('win'), "Not applicable on non-Windows")
|
||||
|
||||
local file = helpers.tmpname()
|
||||
write_file(file, 'Test content')
|
||||
|
||||
Reference in New Issue
Block a user