diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-14 17:12:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-14 09:12:35 +0000 |
commit | a25ce5762de712e67db5c3dc0f2537894d5a4420 (patch) | |
tree | a0df656f9d1f35eb7387f28dbcb2710eaafabb0c /test/functional/legacy | |
parent | 4a5585da7e35a32b1da988d4fc39496d5510e3ae (diff) | |
download | rneovim-a25ce5762de712e67db5c3dc0f2537894d5a4420.tar.gz rneovim-a25ce5762de712e67db5c3dc0f2537894d5a4420.tar.bz2 rneovim-a25ce5762de712e67db5c3dc0f2537894d5a4420.zip |
test: do not dedent() in feed() (#32884)
Most callers of feed() do not expect feed() to dedent.
Now use a literal space in tests where it looks better.
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/034_user_function_spec.lua | 11 | ||||
-rw-r--r-- | test/functional/legacy/069_multibyte_formatting_spec.lua | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/test/functional/legacy/034_user_function_spec.lua b/test/functional/legacy/034_user_function_spec.lua index 89bf3b8920..ebac1adcb8 100644 --- a/test/functional/legacy/034_user_function_spec.lua +++ b/test/functional/legacy/034_user_function_spec.lua @@ -63,12 +63,11 @@ describe( /^here ]]) feed('C<C-R>=Table("xxx", 4, "asdf")<cr>') - -- Using a actual space will not work as feed() calls dedent on the input. - feed('<space><C-R>=Compute(45, 0, "retval")<cr>') - feed('<space><C-R>=retval<cr>') - feed('<space><C-R>=Compute(45, 5, "retval")<cr>') - feed('<space><C-R>=retval<cr>') - feed('<space><C-R>=g:FuncRef(333)<cr>') + feed(' <C-R>=Compute(45, 0, "retval")<cr>') + feed(' <C-R>=retval<cr>') + feed(' <C-R>=Compute(45, 5, "retval")<cr>') + feed(' <C-R>=retval<cr>') + feed(' <C-R>=g:FuncRef(333)<cr>') feed('<cr>') feed('XX+-XX<cr>') feed('---*---<cr>') diff --git a/test/functional/legacy/069_multibyte_formatting_spec.lua b/test/functional/legacy/069_multibyte_formatting_spec.lua index 24a4692e6c..de31b8d396 100644 --- a/test/functional/legacy/069_multibyte_formatting_spec.lua +++ b/test/functional/legacy/069_multibyte_formatting_spec.lua @@ -183,9 +183,8 @@ describe('multibyte text', function() feed_command('/^{/+1') feed_command('set noai tw=2 fo=tm') feed('gqgqjgqgqo<cr>') - -- Literal spaces will be trimmed from the by feed(). - feed('<space><space>X<cr>') - feed('<space><space>Xa<esc>') + feed(' X<cr>') + feed(' Xa<esc>') expect([[ { X |