aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdd Barrett <vext01@gmail.com>2019-08-18 13:39:31 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-09-01 22:49:33 -0700
commitb64af88c848204f2193cf0f18b94d12731e5bd2f (patch)
tree19322612c359903badbe6f3342977b5ec336c4a5
parentd1bed81ad8a1dde99953e1f880e5794680d53d62 (diff)
downloadrneovim-b64af88c848204f2193cf0f18b94d12731e5bd2f.tar.gz
rneovim-b64af88c848204f2193cf0f18b94d12731e5bd2f.tar.bz2
rneovim-b64af88c848204f2193cf0f18b94d12731e5bd2f.zip
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
-rw-r--r--.builds/openbsd.yml9
-rw-r--r--test/functional/core/channels_spec.lua4
-rw-r--r--test/functional/core/job_spec.lua4
-rw-r--r--test/functional/terminal/scrollback_spec.lua6
-rw-r--r--test/functional/terminal/tui_spec.lua4
5 files changed, 16 insertions, 11 deletions
diff --git a/.builds/openbsd.yml b/.builds/openbsd.yml
index 1ac830e6ad..a8f6992e3f 100644
--- a/.builds/openbsd.yml
+++ b/.builds/openbsd.yml
@@ -28,11 +28,14 @@ tasks:
cd ..
mkdir build
cd build
- cmake -G Ninja ..
+ cmake -G Ninja -DMIN_LOG_LEVEL=3 ..
cmake --build . --config Debug
./bin/nvim --version
- test: |
export LC_CTYPE=en_US.UTF-8
- cd neovim
+ # functional tests
+ cd neovim/build
+ # cmake --build . --config Debug --target functionaltest
# oldtests
- gmake -C src/nvim/testdir NVIM_PRG=`pwd`/build/bin/nvim
+ cd ..
+ gmake oldtest
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua
index ddaed1c448..30dcb6d7b4 100644
--- a/test/functional/core/channels_spec.lua
+++ b/test/functional/core/channels_spec.lua
@@ -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)
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index 2531b45521..73b0a0009d 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -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
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
index 544325e746..065cb98e69 100644
--- a/test/functional/terminal/scrollback_spec.lua
+++ b/test/functional/terminal/scrollback_spec.lua
@@ -406,7 +406,7 @@ describe("'scrollback' option", function()
if iswin() then
feed_data('for /L %I in (1,1,30) do @(echo line%I)\r')
else
- feed_data('for i in $(seq 1 30); do echo "line$i"; done\n')
+ feed_data('awk "BEGIN{for(n=1;n<=30;n++) print \\\"line\\\" n}"\n')
end
screen:expect{any='line30 '}
retry(nil, nil, function() expect_lines(7) end)
@@ -431,7 +431,7 @@ describe("'scrollback' option", function()
if iswin() then
feed_data('for /L %I in (1,1,30) do @(echo line%I)\r')
else
- feed_data('for i in $(seq 1 30); do echo "line$i"; done\n')
+ feed_data('awk "BEGIN{for(n=1;n<=30;n++) print \\\"line\\\" n}"\n')
end
screen:expect{any='line30 '}
@@ -448,7 +448,7 @@ describe("'scrollback' option", function()
if iswin() then
feed_data('for /L %I in (1,1,40) do @(echo line%I)\r')
else
- feed_data('for i in $(seq 1 40); do echo "line$i"; done\n')
+ feed_data('awk "BEGIN{for(n=1;n<=40;n++) print \\\"line\\\" n}"\n')
end
screen:expect{any='line40 '}
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 312e060a70..01e13ce4d4 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -1203,7 +1203,9 @@ describe("TUI 'term' option", function()
end)
it('gets system-provided term if $TERM is valid', function()
- if is_bsd then -- BSD lacks terminfo, builtin is always used.
+ if string.lower(uname()) == "openbsd" then
+ assert_term("xterm", "xterm")
+ elseif is_bsd then -- BSD lacks terminfo, builtin is always used.
assert_term("xterm", "builtin_xterm")
elseif is_macos then
local status, _ = pcall(assert_term, "xterm", "xterm")