diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-11-14 13:10:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 13:10:32 +0100 |
| commit | 7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc (patch) | |
| tree | fc5908c85c0cc6affc3bc325cd75f6efaeea95d8 /test/functional/editor/mode_insert_spec.lua | |
| parent | 40dee8a2dcba996badaa6182eb34fde1694f92a3 (diff) | |
| parent | e61228a214ebda9845db9462dad0a8c362d3963f (diff) | |
| download | rneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.tar.gz rneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.tar.bz2 rneovim-7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc.zip | |
Merge pull request #31168 from bfredl/noattach
fix(tests): needing two calls to setup a screen is cringe
Diffstat (limited to 'test/functional/editor/mode_insert_spec.lua')
| -rw-r--r-- | test/functional/editor/mode_insert_spec.lua | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/test/functional/editor/mode_insert_spec.lua b/test/functional/editor/mode_insert_spec.lua index 87d5c46134..a9fa93590f 100644 --- a/test/functional/editor/mode_insert_spec.lua +++ b/test/functional/editor/mode_insert_spec.lua @@ -55,7 +55,6 @@ describe('insert-mode', function() it('double quote is removed after hit-enter prompt #22609', function() local screen = Screen.new(50, 6) - screen:attach() feed('i<C-R>') screen:expect([[ {18:^"} | @@ -180,7 +179,6 @@ describe('insert-mode', function() it('multi-char mapping updates screen properly #25626', function() local screen = Screen.new(60, 6) - screen:attach() command('vnew') insert('foo\nfoo\nfoo') command('wincmd w') @@ -228,8 +226,7 @@ describe('insert-mode', function() end it('works with tabs and spaces', function() - local screen = Screen.new(30, 2) - screen:attach() + local _ = Screen.new(30, 2) command('setl ts=4 sw=4') set_lines(0, 1, '\t' .. s(4) .. '\t' .. s(9) .. '\t a') feed('$i') @@ -246,8 +243,7 @@ describe('insert-mode', function() end) it('works with varsofttabstop', function() - local screen = Screen.new(30, 2) - screen:attach() + local _ = Screen.new(30, 2) command('setl vsts=6,2,5,3') set_lines(0, 1, 'a\t' .. s(4) .. '\t a') feed('$i') @@ -263,8 +259,7 @@ describe('insert-mode', function() end) it('works with tab as ^I', function() - local screen = Screen.new(30, 2) - screen:attach() + local _ = Screen.new(30, 2) command('set list listchars=space:.') command('setl ts=4 sw=4') set_lines(0, 1, '\t' .. s(4) .. '\t' .. s(9) .. '\t a') @@ -280,8 +275,7 @@ describe('insert-mode', function() end) it('works in replace mode', function() - local screen = Screen.new(50, 2) - screen:attach() + local _ = Screen.new(50, 2) command('setl ts=8 sw=8 sts=8') set_lines(0, 1, '\t' .. s(4) .. '\t' .. s(9) .. '\t a') feed('$R') @@ -296,8 +290,7 @@ describe('insert-mode', function() end) it('works with breakindent', function() - local screen = Screen.new(17, 4) - screen:attach() + local _ = Screen.new(17, 4) command('setl ts=4 sw=4 bri briopt=min:5') set_lines(0, 1, '\t' .. s(4) .. '\t' .. s(9) .. '\t a') feed('$i') @@ -314,8 +307,7 @@ describe('insert-mode', function() end) it('works with inline virtual text', function() - local screen = Screen.new(50, 2) - screen:attach() + local _ = Screen.new(50, 2) command('setl ts=4 sw=4') set_lines(0, 1, '\t' .. s(4) .. '\t' .. s(9) .. '\t a') local ns = api.nvim_create_namespace('') @@ -335,8 +327,7 @@ describe('insert-mode', function() end) it("works with 'revins'", function() - local screen = Screen.new(30, 3) - screen:attach() + local _ = Screen.new(30, 3) command('setl ts=4 sw=4 revins') set_lines(0, 1, ('a'):rep(16), s(3) .. '\t' .. s(4) .. '\t a') feed('j$i') @@ -354,7 +345,6 @@ describe('insert-mode', function() it('backspace after replacing multibyte chars', function() local screen = Screen.new(30, 3) - screen:attach() api.nvim_buf_set_lines(0, 0, -1, true, { 'test ȧ̟̜̝̅̚m̆̉̐̐̇̈ å' }) feed('^Rabcdefghi') screen:expect([[ |