mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +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:
@@ -8,7 +8,7 @@ local funcs = helpers.funcs
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local command = helpers.command
|
||||
local feed = helpers.feed
|
||||
local iswin = helpers.iswin
|
||||
local is_os = helpers.is_os
|
||||
|
||||
describe('execute()', function()
|
||||
before_each(clear)
|
||||
@@ -265,7 +265,7 @@ describe('execute()', function()
|
||||
-- This deviates from vim behavior, but is consistent
|
||||
-- with how nvim currently displays the output.
|
||||
it('captures shell-command output', function()
|
||||
local win_lf = iswin() and '\13' or ''
|
||||
local win_lf = is_os('win') and '\13' or ''
|
||||
eq('\n:!echo foo\r\n\nfoo'..win_lf..'\n', funcs.execute('!echo foo'))
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user