diff options
Diffstat (limited to 'test/functional')
| -rw-r--r-- | test/functional/eval/let_spec.lua | 22 | ||||
| -rw-r--r-- | test/functional/helpers.lua | 6 | ||||
| -rw-r--r-- | test/functional/legacy/arglist_spec.lua | 4 |
3 files changed, 30 insertions, 2 deletions
diff --git a/test/functional/eval/let_spec.lua b/test/functional/eval/let_spec.lua new file mode 100644 index 0000000000..c3ab3cc367 --- /dev/null +++ b/test/functional/eval/let_spec.lua @@ -0,0 +1,22 @@ +local helpers = require('test.functional.helpers')(after_each) + +local eq = helpers.eq +local clear = helpers.clear +local meths = helpers.meths +local redir_exec = helpers.redir_exec + +before_each(clear) + +describe(':let command', function() + it('correctly lists variables with curly-braces', function() + meths.set_var('v', {0}) + eq('\nv [0]', redir_exec('let {"v"}')) + end) + + it('correctly lists variables with subscript', function() + meths.set_var('v', {0}) + eq('\nv[0] #0', redir_exec('let v[0]')) + eq('\ng:["v"][0] #0', redir_exec('let g:["v"][0]')) + eq('\n{"g:"}["v"][0] #0', redir_exec('let {"g:"}["v"][0]')) + end) +end) diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 4db658d98c..53cbf8d4a1 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -9,6 +9,7 @@ local TcpStream = require('nvim.tcp_stream') local SocketStream = require('nvim.socket_stream') local ChildProcessStream = require('nvim.child_process_stream') +local check_cores = global_helpers.check_cores local check_logs = global_helpers.check_logs local neq = global_helpers.neq local eq = global_helpers.eq @@ -608,7 +609,10 @@ local M = { return function(after_each) if after_each then - after_each(check_logs) + after_each(function() + check_logs() + check_cores('build/bin/nvim') + end) end return M end diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index b86d3f0aea..f5e3522972 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -222,7 +222,6 @@ describe('argument list commands', function() execute('argedit a') eq({'a', 'b'}, eval('argv()')) eq('a', eval('expand("%:t")')) - assert_fails('argedit a b', 'E172:') execute('argedit c') eq({'a', 'c', 'b'}, eval('argv()')) execute('0argedit x') @@ -232,6 +231,9 @@ describe('argument list commands', function() execute('argedit! y') eq({'x', 'y', 'a', 'c', 'b'}, eval('argv()')) execute('%argd') + -- Nvim allows unescaped spaces in filename on all platforms. #6010 + execute('argedit a b') + eq({'a b'}, eval('argv()')) end) it('test for :argdelete command', function() |