CI/OpenBSD: run functional tests

Adapt some tests for OpenBSD:

- scrollback_spec:
  - seq(1) is not available on OpenBSD: we'd use jot(1).
  - Instead use a (hopefully) portable awk(1) snippet.
- channels_spec
- job_spec
- tui_spec
This commit is contained in:
Edd Barrett
2019-08-18 13:39:31 +01:00
committed by Justin M. Keyes
parent d1bed81ad8
commit b64af88c84
5 changed files with 16 additions and 11 deletions

View File

@@ -139,8 +139,8 @@ describe('channels', function()
command("call chansend(id, 'incomplet\004')")
local is_freebsd = (string.lower(uname()) == 'freebsd')
local bsdlike = is_freebsd or (os_name() == "osx")
local is_bsd = not not string.find(string.lower(uname()), 'bsd')
local bsdlike = is_bsd or (os_name() == "osx")
local extra = bsdlike and "^D\008\008" or ""
expect_twoline(id, "stdout",
"incomplet"..extra, "[1, ['incomplet'], 'stdin']", true)

View File

@@ -429,7 +429,7 @@ describe('jobs', function()
if has('win32')
let cmd = 'for /L %I in (1,1,5) do @(echo %I& ping -n 2 127.0.0.1 > nul)'
else
let cmd = ['sh', '-c', 'for i in $(seq 1 5); do echo $i; sleep 0.1; done']
let cmd = ['sh', '-c', 'for i in 1 2 3 4 5; do echo $i; sleep 0.1; done']
endif
let g:id = jobstart(cmd, d)
sleep 1500m
@@ -472,7 +472,7 @@ describe('jobs', function()
if has('win32')
let cmd = 'for /L %I in (1,1,5) do @(echo %I& ping -n 2 127.0.0.1 > nul)'
else
let cmd = ['sh', '-c', 'for i in $(seq 1 5); do echo $i; sleep 0.1; done']
let cmd = ['sh', '-c', 'for i in 1 2 3 4 5; do echo $i; sleep 0.1; done']
endif
let g:id = jobstart(cmd, d)
sleep 1500m