diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-15 06:10:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 06:10:48 -0700 |
commit | 942b16adf7312c243fb27e579fa5da794fa0f502 (patch) | |
tree | 7ed2995621a61974bea3086bd9a5ac576cbb23cb /test/functional/api/vim_spec.lua | |
parent | 04cde576edc1cb4795769ef2520416997c0f79c0 (diff) | |
parent | cf62554e5aeac5e9417cafdd1fe4cfb8c48d08ba (diff) | |
download | rneovim-942b16adf7312c243fb27e579fa5da794fa0f502.tar.gz rneovim-942b16adf7312c243fb27e579fa5da794fa0f502.tar.bz2 rneovim-942b16adf7312c243fb27e579fa5da794fa0f502.zip |
Merge #15671 backport: :source and nvim_exec fixes
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 91d2745130..227f168298 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -115,6 +115,19 @@ describe('API', function() nvim('exec','autocmd BufAdd * :let x1 = "Hello"', false) nvim('command', 'new foo') eq('Hello', request('nvim_eval', 'g:x1')) + + -- Line continuations + nvim('exec', [[ + let abc = #{ + \ a: 1, + "\ b: 2, + \ c: 3 + \ }]], false) + eq({a = 1, c = 3}, request('nvim_eval', 'g:abc')) + + -- try no spaces before continuations to catch off-by-one error + nvim('exec', 'let ab = #{\n\\a: 98,\n"\\ b: 2\n\\}', false) + eq({a = 98}, request('nvim_eval', 'g:ab')) end) it('non-ASCII input', function() |