mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test/channels_spec: cleanup
- Remove stray print() - Use uname() instead of system('uname')
This commit is contained in:
parent
ab7d9ae193
commit
24f9dd73d5
@ -1,3 +1,5 @@
|
||||
local global_helpers = require('test.helpers')
|
||||
local uname = global_helpers.uname
|
||||
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
|
||||
@ -7,6 +9,7 @@ local sleep = helpers.sleep
|
||||
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
|
||||
local set_session = helpers.set_session
|
||||
local nvim_prog = helpers.nvim_prog
|
||||
local os_name = helpers.os_name
|
||||
local retry = helpers.retry
|
||||
local expect_twostreams = helpers.expect_twostreams
|
||||
|
||||
@ -138,9 +141,8 @@ describe('channels', function()
|
||||
|
||||
command("call chansend(id, 'incomplet\004')")
|
||||
|
||||
local is_freebsd = eval("system('uname') =~? 'FreeBSD'") == 1
|
||||
local bsdlike = is_freebsd or (helpers.os_name() == "osx")
|
||||
print("bsdlike:", bsdlike)
|
||||
local is_freebsd = (string.lower(uname()) == 'freebsd')
|
||||
local bsdlike = is_freebsd or (os_name() == "osx")
|
||||
local extra = bsdlike and "^D\008\008" or ""
|
||||
expect_twoline(id, "stdout",
|
||||
"incomplet"..extra, "[1, ['incomplet'], 'stdin']", true)
|
||||
|
@ -6,7 +6,7 @@ local clear, curbufmeths = helpers.clear, helpers.curbufmeths
|
||||
local exc_exec, expect, eval = helpers.exc_exec, helpers.expect, helpers.eval
|
||||
local insert = helpers.insert
|
||||
|
||||
describe('api functions', function()
|
||||
describe('eval-API', function()
|
||||
before_each(clear)
|
||||
|
||||
it("work", function()
|
||||
|
Loading…
Reference in New Issue
Block a user