aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-02-04 07:54:30 -0500
committerGitHub <noreply@github.com>2018-02-04 07:54:30 -0500
commit0851057a8deaa1197bd0af22babb62c1146d836c (patch)
treea6f796181ed7b76b470d6ce0fbb2df0a836fccae /test/functional
parente2afcfb020fa16b465dd25d3455cd00487e68915 (diff)
parentde10ea55f370cd57b79d23c2ae09bebf154a0f1a (diff)
downloadrneovim-0851057a8deaa1197bd0af22babb62c1146d836c.tar.gz
rneovim-0851057a8deaa1197bd0af22babb62c1146d836c.tar.bz2
rneovim-0851057a8deaa1197bd0af22babb62c1146d836c.zip
Merge pull request #7957 from jamessan/lua-functionaltest
[RFC] Ensure build works without LuaJIT available
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/api/vim_spec.lua17
-rw-r--r--test/functional/plugin/man_spec.lua4
2 files changed, 16 insertions, 5 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 39db831fe3..a92acd36b1 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -951,9 +951,20 @@ describe('api', function()
end
end)
if not err then
- msg = format_string('Error while processing test (%r, %s):\n%s',
- str, FLAGS_TO_STR[flags], msg)
- error(msg)
+ if type(msg) == 'table' then
+ local merr, new_msg = pcall(
+ format_string, 'table error:\n%s\n\n(%r)', msg.message, msg)
+ if merr then
+ msg = new_msg
+ else
+ msg = format_string('table error without .message:\n(%r)',
+ msg)
+ end
+ elseif type(msg) ~= 'string' then
+ msg = format_string('non-string non-table error:\n%r', msg)
+ end
+ error(format_string('Error while processing test (%r, %s):\n%s',
+ str, FLAGS_TO_STR[flags], msg))
end
end
end
diff --git a/test/functional/plugin/man_spec.lua b/test/functional/plugin/man_spec.lua
index dc189b8f8e..e5da7932a5 100644
--- a/test/functional/plugin/man_spec.lua
+++ b/test/functional/plugin/man_spec.lua
@@ -66,13 +66,13 @@ describe(':Man', function()
ithis <C-v><ESC>[1mis <C-v><ESC>[3ma <C-v><ESC>[4mtest<C-v><ESC>[0m
<C-v><ESC>[4mwith<C-v><ESC>[24m <C-v><ESC>[4mescaped<C-v><ESC>[24m <C-v><ESC>[4mtext<C-v><ESC>[24m<ESC>]])
- screen:expect([[
+ screen:expect([=[
this ^[[1mis ^[[3ma ^[[4mtest^[[0m |
^[[4mwith^[[24m ^[[4mescaped^[[24m ^[[4mtext^[[24^m |
~ |
~ |
|
- ]])
+ ]=])
eval('man#init_pager()')