aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-09-03 13:29:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-09-03 04:29:49 -0700
commitdcc8fcf0b9d819357d5ec9beb36cf698e600e809 (patch)
treef9973e5cafd3c2864564f49358b345fbc93129fa
parentd000f02bc0803cd92503293e505a2d2b4c4b8514 (diff)
downloadrneovim-dcc8fcf0b9d819357d5ec9beb36cf698e600e809.tar.gz
rneovim-dcc8fcf0b9d819357d5ec9beb36cf698e600e809.tar.bz2
rneovim-dcc8fcf0b9d819357d5ec9beb36cf698e600e809.zip
tests: assert:set_parameter('TableFormatLevel', 100) #10925
luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
-rw-r--r--test/README.md5
-rw-r--r--test/functional/api/vim_spec.lua1
-rw-r--r--test/functional/plugin/shada_spec.lua2
-rw-r--r--test/helpers.lua2
-rw-r--r--test/unit/viml/expressions/parser_spec.lua4
5 files changed, 2 insertions, 12 deletions
diff --git a/test/README.md b/test/README.md
index 73d51c995c..60279589b1 100644
--- a/test/README.md
+++ b/test/README.md
@@ -249,11 +249,6 @@ the file).
Configuration
=============
-busted (luassert) by default does not print the full result of deeply-nested
-tables. But sometimes it's useful while debugging a test.
-
- assert:set_parameter('TableFormatLevel', 1000000)
-
Test behaviour is affected by environment variables. Currently supported
(Functional, Unit, Benchmarks) (when Defined; when set to _1_; when defined,
treated as Integer; when defined, treated as String; when defined, treated as
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 851feddb54..5df86b3261 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -1568,7 +1568,6 @@ describe('API', function()
return ('%s(%s)%s'):format(typ, args, rest)
end
end
- assert:set_parameter('TableFormatLevel', 1000000)
require('test.unit.viml.expressions.parser_tests')(
it_maybe_pending, _check_parsing, hl, fmtn)
end)
diff --git a/test/functional/plugin/shada_spec.lua b/test/functional/plugin/shada_spec.lua
index c0104a58f7..d96b479a62 100644
--- a/test/functional/plugin/shada_spec.lua
+++ b/test/functional/plugin/shada_spec.lua
@@ -1360,8 +1360,6 @@ describe('autoload/shada.vim', function()
nvim_command('unlet g:__actual')
end
- assert:set_parameter('TableFormatLevel', 100)
-
it('works with multiple items', function()
strings2sd_eq({{
type=11, timestamp=0, data={
diff --git a/test/helpers.lua b/test/helpers.lua
index 25fff55596..779d33e3b1 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -6,6 +6,8 @@ local lfs = require('lfs')
local relpath = require('pl.path').relpath
local Paths = require('test.config.paths')
+assert:set_parameter('TableFormatLevel', 100)
+
local quote_me = '[^.%w%+%-%@%_%/]' -- complement (needn't quote)
local function shell_quote(str)
if string.find(str, quote_me) or str == '' then
diff --git a/test/unit/viml/expressions/parser_spec.lua b/test/unit/viml/expressions/parser_spec.lua
index a8f29529ec..032baf6578 100644
--- a/test/unit/viml/expressions/parser_spec.lua
+++ b/test/unit/viml/expressions/parser_spec.lua
@@ -451,10 +451,6 @@ local function phl2lua(pstate)
return ret
end
-child_call_once(function()
- assert:set_parameter('TableFormatLevel', 1000000)
-end)
-
describe('Expressions parser', function()
local function _check_parsing(opts, str, exp_ast, exp_highlighting_fs,
nz_flags_exps)