diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:15:05 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:27:38 +0000 |
commit | c5d770d311841ea5230426cc4c868e8db27300a8 (patch) | |
tree | dd21f70127b4b8b5f109baefc8ecc5016f507c91 /test/functional/legacy | |
parent | 9be89f131f87608f224f0ee06d199fcd09d32176 (diff) | |
parent | 081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff) | |
download | rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2 rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/legacy')
43 files changed, 157 insertions, 220 deletions
diff --git a/test/functional/legacy/012_directory_spec.lua b/test/functional/legacy/012_directory_spec.lua index 5c9185982f..d6f2203aa2 100644 --- a/test/functional/legacy/012_directory_spec.lua +++ b/test/functional/legacy/012_directory_spec.lua @@ -15,7 +15,6 @@ local clear = n.clear local insert = n.insert local command = n.command local write_file = t.write_file -local expect_exit = n.expect_exit local mkdir = t.mkdir local function ls_dir_sorted(dirname) @@ -44,7 +43,9 @@ describe("'directory' option", function() clear() end) teardown(function() - expect_exit(command, 'qall!') + command('%bwipe!') + api.nvim_set_option_value('swapfile', false, {}) + api.nvim_set_option_value('directory', '.', {}) n.rmdir('Xtest.je') n.rmdir('Xtest2') os.remove('Xtest1') @@ -58,7 +59,6 @@ describe("'directory' option", function() end of testfile]]) api.nvim_set_option_value('swapfile', true, {}) - api.nvim_set_option_value('swapfile', true, {}) api.nvim_set_option_value('directory', '.', {}) -- sanity check: files should not exist yet. diff --git a/test/functional/legacy/063_match_and_matchadd_spec.lua b/test/functional/legacy/063_match_and_matchadd_spec.lua index 7515bcf182..639a97f68f 100644 --- a/test/functional/legacy/063_match_and_matchadd_spec.lua +++ b/test/functional/legacy/063_match_and_matchadd_spec.lua @@ -11,7 +11,6 @@ describe('063: Test for ":match", "matchadd()" and related functions', function( it('is working', function() local screen = Screen.new(40, 5) - screen:attach() command('highlight MyGroup1 term=bold ctermbg=red guibg=red') command('highlight MyGroup2 term=italic ctermbg=green guibg=green') diff --git a/test/functional/legacy/074_global_var_in_viminfo_spec.lua b/test/functional/legacy/074_global_var_in_viminfo_spec.lua index d56a2654e3..eb5e36120f 100644 --- a/test/functional/legacy/074_global_var_in_viminfo_spec.lua +++ b/test/functional/legacy/074_global_var_in_viminfo_spec.lua @@ -150,5 +150,7 @@ describe('storing global variables in ShaDa files', function() teardown(function() os.remove(tempname) + command('set shadafile=NONE') + os.remove('Xviminfo') end) end) diff --git a/test/functional/legacy/078_swapfile_recover_spec.lua b/test/functional/legacy/078_swapfile_recover_spec.lua index fa53482393..6ff7539940 100644 --- a/test/functional/legacy/078_swapfile_recover_spec.lua +++ b/test/functional/legacy/078_swapfile_recover_spec.lua @@ -45,7 +45,7 @@ describe('78', function() silent recover Xtest call delete(g:swapname) - new + noswapfile new call append(0, 'recovery start') wincmd w diff --git a/test/functional/legacy/107_adjust_window_and_contents_spec.lua b/test/functional/legacy/107_adjust_window_and_contents_spec.lua index 57ecf76f3a..e97c9c074b 100644 --- a/test/functional/legacy/107_adjust_window_and_contents_spec.lua +++ b/test/functional/legacy/107_adjust_window_and_contents_spec.lua @@ -13,7 +13,6 @@ describe('107', function() it('is working', function() local screen = Screen.new() - screen:attach() insert('start:') poke_eventloop() diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index ac2a39a381..4c083a8a4b 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -20,7 +20,6 @@ describe('argument list commands', function() it(':confirm quit with unedited files in arglist', function() local screen = Screen.new(60, 6) - screen:attach() command('set nomore') command('args a b c') feed(':confirm quit\n') diff --git a/test/functional/legacy/breakindent_spec.lua b/test/functional/legacy/breakindent_spec.lua index 8c3d73b17b..db27e19e50 100644 --- a/test/functional/legacy/breakindent_spec.lua +++ b/test/functional/legacy/breakindent_spec.lua @@ -17,7 +17,6 @@ describe('breakindent', function() [1] = { background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue }, -- SignColumn [2] = { bold = true }, -- ModeMsg }) - screen:attach() exec([[ set listchars=eol:$ let &signcolumn = 'yes' @@ -68,7 +67,6 @@ describe('breakindent', function() setlocal breakindent call setline(1, "\t" .. join(range(100))) ]]) - screen:attach() feed('v$') screen:expect([[ diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua index 2e0e52117d..bf146e1322 100644 --- a/test/functional/legacy/cmdline_spec.lua +++ b/test/functional/legacy/cmdline_spec.lua @@ -15,7 +15,6 @@ describe('cmdline', function() -- oldtest: Test_cmdlineclear_tabenter() it('is cleared when switching tabs', function() local screen = Screen.new(30, 10) - screen:attach() feed_command([[call setline(1, range(30))]]) screen:expect([[ @@ -79,7 +78,6 @@ describe('cmdline', function() -- oldtest: Test_verbose_option() it('prints every executed Ex command if verbose >= 16', function() local screen = Screen.new(60, 12) - screen:attach() exec([[ command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v call feedkeys("\r", 't') " for the hit-enter prompt @@ -104,7 +102,6 @@ describe('cmdline', function() -- oldtest: Test_cmdline_redraw_tabline() it('tabline is redrawn on entering cmdline', function() local screen = Screen.new(30, 6) - screen:attach() exec([[ set showtabline=2 autocmd CmdlineEnter * set tabline=foo @@ -121,7 +118,6 @@ describe('cmdline', function() -- oldtest: Test_redraw_in_autocmd() it('cmdline cursor position is correct after :redraw with cmdheight=2', function() local screen = Screen.new(30, 6) - screen:attach() exec([[ set cmdheight=2 autocmd CmdlineChanged * redraw @@ -143,11 +139,17 @@ describe('cmdline', function() ]]) end) - it("setting 'cmdheight' works after outputting two messages vim-patch:9.0.0665", function() + -- oldtest: Test_changing_cmdheight() + it("changing 'cmdheight'", function() local screen = Screen.new(60, 8) - screen:attach() exec([[ set cmdheight=1 laststatus=2 + func EchoOne() + set laststatus=2 cmdheight=1 + echo 'foo' + echo 'bar' + set cmdheight=2 + endfunc func EchoTwo() set laststatus=2 set cmdheight=5 @@ -156,6 +158,8 @@ describe('cmdline', function() set cmdheight=1 endfunc ]]) + + -- setting 'cmdheight' works after outputting two messages feed(':call EchoTwo()') screen:expect([[ | @@ -170,12 +174,22 @@ describe('cmdline', function() {3:[No Name] }| | ]]) + + -- increasing 'cmdheight' doesn't clear the messages that need hit-enter + feed(':call EchoOne()<CR>') + screen:expect([[ + | + {1:~ }|*3 + {3: }| + foo | + bar | + {6:Press ENTER or type command to continue}^ | + ]]) end) -- oldtest: Test_cmdheight_tabline() it("changing 'cmdheight' when there is a tabline", function() local screen = Screen.new(60, 8) - screen:attach() api.nvim_set_option_value('laststatus', 2, {}) api.nvim_set_option_value('showtabline', 2, {}) api.nvim_set_option_value('cmdheight', 1, {}) @@ -191,7 +205,6 @@ describe('cmdline', function() -- oldtest: Test_rulerformat_position() it("ruler has correct position with 'rulerformat' set", function() local screen = Screen.new(20, 3) - screen:attach() api.nvim_set_option_value('ruler', true, {}) api.nvim_set_option_value('rulerformat', 'longish', {}) api.nvim_set_option_value('laststatus', 0, {}) @@ -218,7 +231,6 @@ describe('cmdwin', function() [3] = { bold = true, foreground = Screen.colors.SeaGreen }, -- MoreMsg [4] = { bold = true }, -- ModeMsg }) - screen:attach() command('set more') command('autocmd WinNew * highlight') feed('q:') diff --git a/test/functional/legacy/conceal_spec.lua b/test/functional/legacy/conceal_spec.lua index f4c1983bb7..66a99fe684 100644 --- a/test/functional/legacy/conceal_spec.lua +++ b/test/functional/legacy/conceal_spec.lua @@ -21,7 +21,6 @@ describe('Conceal', function() -- oldtest: Test_conceal_two_windows() it('works', function() local screen = Screen.new(75, 12) - screen:attach() exec([[ let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"] call setline(1, lines) @@ -382,12 +381,9 @@ describe('Conceal', function() -- oldtest: Test_conceal_with_cursorcolumn() it('CursorColumn and ColorColumn on wrapped line', function() local screen = Screen.new(40, 10) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [1] = { background = Screen.colors.Grey90 }, -- CursorColumn - [2] = { background = Screen.colors.LightRed }, -- ColorColumn - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.LightRed }, + } -- Check that cursorcolumn and colorcolumn don't get broken in presence of -- wrapped lines containing concealed text -- luacheck: push ignore 613 (trailing whitespace in a string) @@ -408,12 +404,12 @@ describe('Conceal', function() -- luacheck: pop screen:expect([[ - one one one one one one {1:o}ne | - {0: >>> }one {2:o}ne one one | + one one one one one one {21:o}ne | + {1: >>> }one {100:o}ne one one | two two two two |hidden| ^here two two | - three three three three {1:t}hree | - {0: >>> }thre{2:e} three three three | - {0:~ }|*4 + three three three three {21:t}hree | + {1: >>> }thre{100:e} three three three | + {1:~ }|*4 /here | ]]) @@ -421,11 +417,11 @@ describe('Conceal', function() feed('$') screen:expect([[ one one one one one one one | - {0: >>> }one {2:o}ne one one | + {1: >>> }one {100:o}ne one one | two two two two |hidden| here two tw^o | three three three three three | - {0: >>> }thre{2:e} three three three | - {0:~ }|*4 + {1: >>> }thre{100:e} three three three | + {1:~ }|*4 /here | ]]) end) @@ -433,12 +429,9 @@ describe('Conceal', function() -- oldtest: Test_conceal_wrapped_cursorline_wincolor() it('CursorLine highlight on wrapped lines', function() local screen = Screen.new(40, 4) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [1] = { background = Screen.colors.Green }, -- CursorLine (low-priority) - [2] = { foreground = Screen.colors.Red }, -- CursorLine (high-priority) - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.WebGreen }, + } exec([[ call setline(1, 'one one one |hidden| one one one one one one one one') syntax match test /|hidden|/ conceal @@ -447,16 +440,16 @@ describe('Conceal', function() hi! CursorLine guibg=Green ]]) screen:expect([[ - {1:one one one one one one one on^e }| - {1: one one one }| - {0:~ }| + {100:one one one one one one one on^e }| + {100: one one one }| + {1:~ }| | ]]) command('hi! CursorLine guibg=NONE guifg=Red') screen:expect([[ - {2:one one one one one one one on^e }| - {2: one one one }| - {0:~ }| + {19:one one one one one one one on^e }| + {19: one one one }| + {1:~ }| | ]]) end) @@ -464,12 +457,9 @@ describe('Conceal', function() -- oldtest: Test_conceal_wrapped_cursorline_wincolor_rightleft() it('CursorLine highlight on wrapped lines with rightleft', function() local screen = Screen.new(40, 4) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [1] = { background = Screen.colors.Green }, -- CursorLine (low-priority) - [2] = { foreground = Screen.colors.Red }, -- CursorLine (high-priority) - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.WebGreen }, + } exec([[ call setline(1, 'one one one |hidden| one one one one one one one one') syntax match test /|hidden|/ conceal @@ -478,16 +468,16 @@ describe('Conceal', function() hi! CursorLine guibg=Green ]]) screen:expect([[ - {1: ^eno eno eno eno eno eno eno eno}| - {1: eno eno eno }| - {0: ~}| + {100: ^eno eno eno eno eno eno eno eno}| + {100: eno eno eno }| + {1: ~}| | ]]) command('hi! CursorLine guibg=NONE guifg=Red') screen:expect([[ - {2: ^eno eno eno eno eno eno eno eno}| - {2: eno eno eno }| - {0: ~}| + {19: ^eno eno eno eno eno eno eno eno}| + {19: eno eno eno }| + {1: ~}| | ]]) end) @@ -495,7 +485,6 @@ describe('Conceal', function() -- oldtest: Test_conceal_resize_term() it('resize editor', function() local screen = Screen.new(75, 6) - screen:attach() exec([[ call setline(1, '`one` `two` `three` `four` `five`, the backticks should be concealed') setl cocu=n cole=3 @@ -519,7 +508,6 @@ describe('Conceal', function() -- oldtest: Test_conceal_linebreak() it('with linebreak', function() local screen = Screen.new(75, 8) - screen:attach() exec([[ let &wrap = v:true let &conceallevel = 2 @@ -625,10 +613,6 @@ describe('Conceal', function() local function test_conceal_virtualedit_after_eol(wrap) local screen = Screen.new(60, 3) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - }) - screen:attach() api.nvim_set_option_value('wrap', wrap, {}) exec([[ call setline(1, 'abcdefgh|hidden|ijklmnpop') @@ -638,31 +622,31 @@ describe('Conceal', function() ]]) screen:expect([[ abcdefghijklmnpo^p | - {0:~ }| + {1:~ }| | ]]) feed('l') screen:expect([[ abcdefghijklmnpop^ | - {0:~ }| + {1:~ }| | ]]) feed('l') screen:expect([[ abcdefghijklmnpop ^ | - {0:~ }| + {1:~ }| | ]]) feed('l') screen:expect([[ abcdefghijklmnpop ^ | - {0:~ }| + {1:~ }| | ]]) feed('rr') screen:expect([[ abcdefghijklmnpop ^r | - {0:~ }| + {1:~ }| | ]]) end @@ -679,10 +663,6 @@ describe('Conceal', function() local function test_conceal_virtualedit_after_eol_rightleft(wrap) local screen = Screen.new(60, 3) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - }) - screen:attach() api.nvim_set_option_value('wrap', wrap, {}) exec([[ call setline(1, 'abcdefgh|hidden|ijklmnpop') @@ -692,31 +672,31 @@ describe('Conceal', function() ]]) screen:expect([[ ^popnmlkjihgfedcba| - {0: ~}| + {1: ~}| | ]]) feed('h') screen:expect([[ ^ popnmlkjihgfedcba| - {0: ~}| + {1: ~}| | ]]) feed('h') screen:expect([[ ^ popnmlkjihgfedcba| - {0: ~}| + {1: ~}| | ]]) feed('h') screen:expect([[ ^ popnmlkjihgfedcba| - {0: ~}| + {1: ~}| | ]]) feed('rr') screen:expect([[ ^r popnmlkjihgfedcba| - {0: ~}| + {1: ~}| | ]]) end @@ -733,12 +713,9 @@ describe('Conceal', function() local function test_conceal_double_width(wrap) local screen = Screen.new(60, 4) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, - [1] = { background = Screen.colors.DarkGrey, foreground = Screen.colors.LightGrey }, - [2] = { background = Screen.colors.LightRed }, - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.LightRed }, + } api.nvim_set_option_value('wrap', wrap, {}) exec([[ call setline(1, ['aaaaa口=口bbbbb口=口ccccc', 'foobar']) @@ -747,30 +724,30 @@ describe('Conceal', function() normal! $ ]]) screen:expect([[ - aaaaa{1:β}bbbbb{1:β}cccc^c {2: } | - foobar {2: } | - {0:~ }| + aaaaa{14:β}bbbbb{14:β}cccc^c {100: } | + foobar {100: } | + {1:~ }| | ]]) feed('gM') screen:expect([[ - aaaaa{1:β}bb^bbb{1:β}ccccc {2: } | - foobar {2: } | - {0:~ }| + aaaaa{14:β}bb^bbb{14:β}ccccc {100: } | + foobar {100: } | + {1:~ }| | ]]) command('set conceallevel=3') screen:expect([[ - aaaaabb^bbbccccc {2: } | - foobar {2: } | - {0:~ }| + aaaaabb^bbbccccc {100: } | + foobar {100: } | + {1:~ }| | ]]) feed('$') screen:expect([[ - aaaaabbbbbcccc^c {2: } | - foobar {2: } | - {0:~ }| + aaaaabbbbbcccc^c {100: } | + foobar {100: } | + {1:~ }| | ]]) end @@ -788,12 +765,9 @@ describe('Conceal', function() -- oldtest: Test_conceal_double_width_wrap() it('line wraps correctly when double-width chars are concealed', function() local screen = Screen.new(20, 4) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, - [1] = { background = Screen.colors.DarkGrey, foreground = Screen.colors.LightGrey }, - [2] = { background = Screen.colors.LightRed }, - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.LightRed }, + } exec([[ call setline(1, 'aaaaaaaaaa口=口bbbbbbbbbb口=口cccccccccc') syntax match test /口=口/ conceal cchar=β @@ -801,30 +775,30 @@ describe('Conceal', function() normal! $ ]]) screen:expect([[ - aaaaaaaaaa{1:β}bbbbb | - bbbbb{1:β}ccccccccc^c | - {0:~ }| + aaaaaaaaaa{14:β}bbbbb | + bbbbb{14:β}ccccccccc^c | + {1:~ }| | ]]) feed('gM') screen:expect([[ - aaaaaaaaaa{1:β}bbbbb | - ^bbbbb{1:β}cccccccccc | - {0:~ }| + aaaaaaaaaa{14:β}bbbbb | + ^bbbbb{14:β}cccccccccc | + {1:~ }| | ]]) command('set conceallevel=3') screen:expect([[ aaaaaaaaaabbbbb | ^bbbbbcccccccccc | - {0:~ }| + {1:~ }| | ]]) feed('$') screen:expect([[ aaaaaaaaaabbbbb | bbbbbccccccccc^c | - {0:~ }| + {1:~ }| | ]]) end) diff --git a/test/functional/legacy/cpoptions_spec.lua b/test/functional/legacy/cpoptions_spec.lua index 56b0e72c72..bd1390c874 100644 --- a/test/functional/legacy/cpoptions_spec.lua +++ b/test/functional/legacy/cpoptions_spec.lua @@ -10,7 +10,6 @@ before_each(clear) describe('cpoptions', function() it('$', function() local screen = Screen.new(30, 6) - screen:attach() command('set cpo+=$') command([[call setline(1, 'one two three')]]) feed('c2w') diff --git a/test/functional/legacy/debugger_spec.lua b/test/functional/legacy/debugger_spec.lua index c6f552ab51..624e797f1c 100644 --- a/test/functional/legacy/debugger_spec.lua +++ b/test/functional/legacy/debugger_spec.lua @@ -14,7 +14,6 @@ describe('debugger', function() before_each(function() screen = Screen.new(999, 10) - screen:attach() end) -- oldtest: Test_Debugger_breakadd_expr() diff --git a/test/functional/legacy/digraph_spec.lua b/test/functional/legacy/digraph_spec.lua index ed1071079c..a90eb48f17 100644 --- a/test/functional/legacy/digraph_spec.lua +++ b/test/functional/legacy/digraph_spec.lua @@ -10,7 +10,6 @@ describe('digraph', function() -- oldtest: Test_entering_digraph() it('characters displayed on the screen', function() local screen = Screen.new(10, 6) - screen:attach() feed('i<C-K>') screen:expect([[ {18:^?} | diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 98b9596847..945cd21710 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -12,7 +12,6 @@ describe('display', function() -- oldtest: Test_display_scroll_at_topline() it('scroll when modified at topline vim-patch:8.2.1488', function() local screen = Screen.new(20, 4) - screen:attach() command([[call setline(1, repeat('a', 21))]]) feed('O') @@ -27,7 +26,6 @@ describe('display', function() -- oldtest: Test_display_scroll_update_visual() it('scrolling when modified at topline in Visual mode vim-patch:8.2.4626', function() local screen = Screen.new(60, 8) - screen:attach() exec([[ set scrolloff=0 @@ -52,7 +50,6 @@ describe('display', function() [2] = { bold = true, reverse = true }, -- StatusLine [3] = { reverse = true }, -- StatusLineNC }) - screen:attach() exec([[ call setline(1, ['aaa', 'b'->repeat(200)]) set display=truncate @@ -131,7 +128,6 @@ describe('display', function() -- oldtest: Test_display_long_lastline() it('"lastline" shows correct text when end of wrapped line is deleted', function() local screen = Screen.new(35, 14) - screen:attach() exec([[ set display=lastline smoothscroll scrolloff=0 call setline(1, [ @@ -183,7 +179,6 @@ describe('display', function() -- oldtest: Test_display_cursor_long_line() it("correctly shows line that doesn't fit in the window", function() local screen = Screen.new(75, 8) - screen:attach() exec([[ call setline(1, ['a', 'b ' .. 'bbbbb'->repeat(150), 'c']) norm $j diff --git a/test/functional/legacy/edit_spec.lua b/test/functional/legacy/edit_spec.lua index 2d98188f9b..d2ce80efda 100644 --- a/test/functional/legacy/edit_spec.lua +++ b/test/functional/legacy/edit_spec.lua @@ -31,7 +31,6 @@ describe('edit', function() -- oldtest: Test_edit_insert_reg() it('inserting a register using CTRL-R', function() local screen = Screen.new(10, 6) - screen:attach() feed('a<C-R>') screen:expect([[ {18:^"} | @@ -55,7 +54,6 @@ describe('edit', function() -- oldtest: Test_edit_ctrl_r_failed() it('positioning cursor after CTRL-R expression failed', function() local screen = Screen.new(60, 6) - screen:attach() feed('i<C-R>') screen:expect([[ diff --git a/test/functional/legacy/ex_mode_spec.lua b/test/functional/legacy/ex_mode_spec.lua index e033898d7a..af4490e7f2 100644 --- a/test/functional/legacy/ex_mode_spec.lua +++ b/test/functional/legacy/ex_mode_spec.lua @@ -47,7 +47,6 @@ describe('Ex mode', function() it('substitute confirmation prompt', function() command('set noincsearch nohlsearch inccommand=') local screen = Screen.new(60, 6) - screen:attach() command([[call setline(1, repeat(['foo foo'], 4))]]) command([[set number]]) feed('gQ') @@ -134,7 +133,6 @@ describe('Ex mode', function() it('pressing Ctrl-C in :append inside a loop in Ex mode does not hang', function() local screen = Screen.new(60, 6) - screen:attach() feed('gQ') feed('for i in range(1)<CR>') feed('append<CR>') diff --git a/test/functional/legacy/excmd_spec.lua b/test/functional/legacy/excmd_spec.lua index 753a45ee05..24b648c3c5 100644 --- a/test/functional/legacy/excmd_spec.lua +++ b/test/functional/legacy/excmd_spec.lua @@ -19,7 +19,6 @@ describe(':confirm command dialog', function() local function start_new() clear() screen = Screen.new(75, 20) - screen:attach() end -- Test for the :confirm command dialog diff --git a/test/functional/legacy/fold_spec.lua b/test/functional/legacy/fold_spec.lua index 4fea1ef113..2bad70e384 100644 --- a/test/functional/legacy/fold_spec.lua +++ b/test/functional/legacy/fold_spec.lua @@ -14,7 +14,6 @@ describe('folding', function() n.clear() screen = Screen.new(45, 8) - screen:attach() end) it('creation, opening, moving (to the end) and closing', function() diff --git a/test/functional/legacy/global_spec.lua b/test/functional/legacy/global_spec.lua index 718fd421b0..a39e7d5d38 100644 --- a/test/functional/legacy/global_spec.lua +++ b/test/functional/legacy/global_spec.lua @@ -12,7 +12,6 @@ describe(':global', function() -- oldtest: Test_interrupt_global() it('can be interrupted using Ctrl-C in cmdline mode vim-patch:9.0.0082', function() local screen = Screen.new(75, 6) - screen:attach() exec([[ set nohlsearch noincsearch diff --git a/test/functional/legacy/highlight_spec.lua b/test/functional/legacy/highlight_spec.lua index 35afd9bb4a..e663931bd7 100644 --- a/test/functional/legacy/highlight_spec.lua +++ b/test/functional/legacy/highlight_spec.lua @@ -15,7 +15,6 @@ before_each(clear) describe(':highlight', function() it('is working', function() local screen = Screen.new(35, 10) - screen:attach() -- Basic test if ":highlight" doesn't crash feed_command('set more') feed(':highlight<CR>') @@ -101,7 +100,6 @@ describe('Visual selection highlight', function() -- oldtest: Test_visual_sbr() it("when 'showbreak' is set", function() local screen = Screen.new(60, 6) - screen:attach() exec([[ set showbreak=> call setline(1, 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.') diff --git a/test/functional/legacy/listchars_spec.lua b/test/functional/legacy/listchars_spec.lua index db9ec7fc9d..b4d07e03ef 100644 --- a/test/functional/legacy/listchars_spec.lua +++ b/test/functional/legacy/listchars_spec.lua @@ -103,7 +103,6 @@ describe("'listchars'", function() it('"exceeds" character does not appear in foldcolumn vim-patch:8.2.3121', function() local screen = Screen.new(60, 10) - screen:attach() exec([[ call setline(1, ['aaa', '', 'a', 'aaaaaa']) vsplit diff --git a/test/functional/legacy/listlbr_spec.lua b/test/functional/legacy/listlbr_spec.lua index da641c3b6f..09835bf97d 100644 --- a/test/functional/legacy/listlbr_spec.lua +++ b/test/functional/legacy/listlbr_spec.lua @@ -205,7 +205,6 @@ describe('listlbr', function() -- oldtest: Test_linebreak_reset_restore() it('cursor position is drawn correctly after operator', function() local screen = Screen.new(60, 6) - screen:attach() -- f_wincol() calls validate_cursor() source([[ diff --git a/test/functional/legacy/listlbr_utf8_spec.lua b/test/functional/legacy/listlbr_utf8_spec.lua index 74cc594cc1..3a0aa7b2b3 100644 --- a/test/functional/legacy/listlbr_utf8_spec.lua +++ b/test/functional/legacy/listlbr_utf8_spec.lua @@ -215,7 +215,6 @@ describe('linebreak', function() -- oldtest: Test_visual_ends_before_showbreak() it("Visual area is correct when it ends before multibyte 'showbreak'", function() local screen = Screen.new(60, 8) - screen:attach() exec([[ let &wrap = v:true let &linebreak = v:true diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua index 3fc324f66a..8593868c83 100644 --- a/test/functional/legacy/mapping_spec.lua +++ b/test/functional/legacy/mapping_spec.lua @@ -196,7 +196,6 @@ describe('mapping', function() -- oldtest: Test_showcmd_part_map() it("'showcmd' with a partial mapping", function() local screen = Screen.new(60, 6) - screen:attach() exec([[ set notimeout showcmd nnoremap ,a <Ignore> diff --git a/test/functional/legacy/match_spec.lua b/test/functional/legacy/match_spec.lua index 0fc8708244..64e223ab8c 100644 --- a/test/functional/legacy/match_spec.lua +++ b/test/functional/legacy/match_spec.lua @@ -11,7 +11,6 @@ describe('matchaddpos()', function() -- oldtest: Test_matchaddpos_dump() it('can add more than 8 match positions vim-patch:9.0.0620', function() local screen = Screen.new(60, 14) - screen:attach() exec([[ call setline(1, ['1234567890123']->repeat(14)) call matchaddpos('Search', range(1, 12)->map({i, v -> [v, v]})) @@ -39,7 +38,6 @@ describe('match highlighting', function() -- oldtest: Test_match_in_linebreak() it('does not continue in linebreak vim-patch:8.2.3698', function() local screen = Screen.new(75, 10) - screen:attach() exec([=[ set breakindent linebreak breakat+=] call printf('%s]%s', repeat('x', 50), repeat('x', 70))->setline(1) @@ -55,7 +53,6 @@ describe('match highlighting', function() it('is shown with incsearch vim-patch:8.2.3940', function() local screen = Screen.new(75, 6) - screen:attach() exec([[ set incsearch call setline(1, range(20)) @@ -82,7 +79,6 @@ describe('match highlighting', function() it('on a Tab vim-patch:8.2.4062', function() local screen = Screen.new(75, 10) - screen:attach() exec([[ set linebreak call setline(1, "\tix") diff --git a/test/functional/legacy/matchparen_spec.lua b/test/functional/legacy/matchparen_spec.lua index df0d80f0ab..d992420c30 100644 --- a/test/functional/legacy/matchparen_spec.lua +++ b/test/functional/legacy/matchparen_spec.lua @@ -11,7 +11,6 @@ describe('matchparen', function() -- oldtest: Test_visual_block_scroll() it('redraws properly after scrolling with scrolloff=1', function() local screen = Screen.new(30, 7) - screen:attach() exec([[ source $VIMRUNTIME/plugin/matchparen.vim set scrolloff=1 @@ -34,20 +33,18 @@ describe('matchparen', function() -- oldtest: Test_matchparen_clear_highlight() it('matchparen highlight is cleared when switching buffer', function() local screen = Screen.new(20, 5) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, - [1] = { background = Screen.colors.Cyan }, - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.Cyan1 }, + } local screen1 = [[ - {1:^()} | - {0:~ }|*3 + {100:^()} | + {1:~ }|*3 | ]] local screen2 = [[ ^aa | - {0:~ }|*3 + {1:~ }|*3 | ]] @@ -77,12 +74,9 @@ describe('matchparen', function() -- oldtest: Test_matchparen_win_execute() it('matchparen highlight when switching buffer in win_execute()', function() local screen = Screen.new(20, 5) - screen:set_default_attr_ids({ - [1] = { background = Screen.colors.Cyan }, - [2] = { reverse = true, bold = true }, - [3] = { reverse = true }, - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.Cyan1 }, + } exec([[ source $VIMRUNTIME/plugin/matchparen.vim @@ -95,10 +89,10 @@ describe('matchparen', function() endfunc ]]) screen:expect([[ - {1:^{}} | - {2:[No Name] [+] }| - {} | + {100:^{}} | {3:[No Name] [+] }| + {} | + {2:[No Name] [+] }| | ]]) @@ -110,7 +104,6 @@ describe('matchparen', function() -- oldtest: Test_matchparen_pum_clear() it('is cleared when completion popup is shown', function() local screen = Screen.new(30, 9) - screen:attach() exec([[ source $VIMRUNTIME/plugin/matchparen.vim @@ -136,12 +129,9 @@ describe('matchparen', function() -- oldtest: Test_matchparen_mbyte() it("works with multibyte chars in 'matchpairs'", function() local screen = Screen.new(30, 10) - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, - [1] = { background = Screen.colors.Cyan }, - [2] = { bold = true }, - }) - screen:attach() + screen:add_extra_attr_ids { + [100] = { background = Screen.colors.Cyan1 }, + } exec([[ source $VIMRUNTIME/plugin/matchparen.vim @@ -152,57 +142,57 @@ describe('matchparen', function() screen:expect([[ ^aaaaaaaa( | bbbb)cc | - {0:~ }|*7 + {1:~ }|*7 | ]]) feed('$') screen:expect([[ - aaaaaaaa{1:^(} | - bbbb{1:)}cc | - {0:~ }|*7 + aaaaaaaa{100:^(} | + bbbb{100:)}cc | + {1:~ }|*7 | ]]) feed('j') screen:expect([[ aaaaaaaa( | bbbb)c^c | - {0:~ }|*7 + {1:~ }|*7 | ]]) feed('2h') screen:expect([[ - aaaaaaaa{1:(} | - bbbb{1:^)}cc | - {0:~ }|*7 + aaaaaaaa{100:(} | + bbbb{100:^)}cc | + {1:~ }|*7 | ]]) feed('0') screen:expect([[ aaaaaaaa( | ^bbbb)cc | - {0:~ }|*7 + {1:~ }|*7 | ]]) feed('kA') screen:expect([[ - aaaaaaaa{1:(}^ | - bbbb{1:)}cc | - {0:~ }|*7 - {2:-- INSERT --} | + aaaaaaaa{100:(}^ | + bbbb{100:)}cc | + {1:~ }|*7 + {5:-- INSERT --} | ]]) feed('<Down>') screen:expect([[ aaaaaaaa( | bbbb)cc^ | - {0:~ }|*7 - {2:-- INSERT --} | + {1:~ }|*7 + {5:-- INSERT --} | ]]) feed('<C-W>') screen:expect([[ - aaaaaaaa{1:(} | - bbbb{1:)}^ | - {0:~ }|*7 - {2:-- INSERT --} | + aaaaaaaa{100:(} | + bbbb{100:)}^ | + {1:~ }|*7 + {5:-- INSERT --} | ]]) end) end) diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua index 2f3693b5ad..bc58551a34 100644 --- a/test/functional/legacy/messages_spec.lua +++ b/test/functional/legacy/messages_spec.lua @@ -17,7 +17,6 @@ describe('messages', function() -- oldtest: Test_warning_scroll() it('a warning causes scrolling if and only if it has a stacktrace', function() screen = Screen.new(75, 6) - screen:attach() -- When the warning comes from a script, messages are scrolled so that the -- stacktrace is visible. @@ -45,7 +44,6 @@ describe('messages', function() -- oldtest: Test_message_not_cleared_after_mode() it('clearing mode does not remove message', function() screen = Screen.new(60, 10) - screen:attach() exec([[ nmap <silent> gx :call DebugSilent('normal')<CR> vmap <silent> gx :call DebugSilent('visual')<CR> @@ -101,7 +99,6 @@ describe('messages', function() [1] = { bold = true, foreground = Screen.colors.SeaGreen }, -- MoreMsg [2] = { foreground = Screen.colors.Brown }, -- LineNr }) - screen:attach() command('call setline(1, range(1, 100))') @@ -394,7 +391,6 @@ describe('messages', function() -- oldtest: Test_echo_verbose_system() it('verbose message before echo command', function() screen = Screen.new(60, 10) - screen:attach() command('cd ' .. nvim_dir) api.nvim_set_option_value('shell', './shell-test', {}) @@ -494,7 +490,6 @@ describe('messages', function() -- oldtest: Test_quit_long_message() it('with control characters can be quit vim-patch:8.2.1844', function() screen = Screen.new(40, 10) - screen:attach() feed([[:echom range(9999)->join("\x01")<CR>]]) screen:expect([[ @@ -521,7 +516,6 @@ describe('messages', function() describe('mode is cleared when', function() before_each(function() screen = Screen.new(40, 6) - screen:attach() end) -- oldtest: Test_mode_message_at_leaving_insert_by_ctrl_c() @@ -591,7 +585,6 @@ describe('messages', function() -- oldtest: Test_ask_yesno() it('y/n prompt works', function() screen = Screen.new(75, 6) - screen:attach() command('set noincsearch nohlsearch inccommand=') command('call setline(1, range(1, 2))') @@ -644,7 +637,6 @@ describe('messages', function() -- oldtest: Test_fileinfo_tabpage_cmdheight() it("fileinfo works when 'cmdheight' has just decreased", function() screen = Screen.new(40, 6) - screen:attach() exec([[ set shortmess-=o @@ -673,7 +665,6 @@ describe('messages', function() -- oldtest: Test_fileinfo_after_echo() it('fileinfo does not overwrite echo message vim-patch:8.2.4156', function() screen = Screen.new(40, 6) - screen:attach() exec([[ set shortmess-=F diff --git a/test/functional/legacy/move_spec.lua b/test/functional/legacy/move_spec.lua index c2be8bb3eb..ae01193049 100644 --- a/test/functional/legacy/move_spec.lua +++ b/test/functional/legacy/move_spec.lua @@ -11,7 +11,6 @@ describe(':move', function() -- oldtest: Test_move_undo() it('redraws correctly when undone', function() local screen = Screen.new(60, 10) - screen:attach() fn.setline(1, { 'First', 'Second', 'Third', 'Fourth' }) feed('gg:move +1<CR>') diff --git a/test/functional/legacy/normal_spec.lua b/test/functional/legacy/normal_spec.lua index 5158ca3009..1ae22a83bd 100644 --- a/test/functional/legacy/normal_spec.lua +++ b/test/functional/legacy/normal_spec.lua @@ -15,7 +15,6 @@ describe('normal', function() before_each(function() clear() screen = Screen.new(40, 19) - screen:attach() end) -- oldtest: Test_normal_j_below_botline() @@ -103,4 +102,33 @@ describe('normal', function() ]], }) end) + + -- oldtest: Test_normal_gm() + it('gm sets curswant correctly', function() + screen:try_resize(75, 10) + exec([[ + call setline(1, repeat([" abcd\tefgh\tij"], 10)) + call cursor(1, 1) + ]]) + feed('jVjzf') + -- gm + feed('gmk') + eq(18, fn.virtcol('.')) + -- g0 + feed('gj0k') + eq(1, fn.virtcol('.')) + -- g^ + feed('jg^k') + eq(3, fn.virtcol('.')) + exec('call cursor(10, 1)') + -- gm + feed('gmk') + eq(18, fn.virtcol('.')) + -- g0 + feed('gj0k') + eq(1, fn.virtcol('.')) + -- g^ + feed('jg^k') + eq(3, fn.virtcol('.')) + end) end) diff --git a/test/functional/legacy/number_spec.lua b/test/functional/legacy/number_spec.lua index 0ebd731f65..4636cd0369 100644 --- a/test/functional/legacy/number_spec.lua +++ b/test/functional/legacy/number_spec.lua @@ -17,7 +17,6 @@ describe("'number' and 'relativenumber'", function() [2] = { foreground = Screen.colors.Blue }, [3] = { foreground = Screen.colors.Green }, }) - screen:attach() exec([[ call setline(1, range(200)) 111 @@ -86,7 +85,6 @@ describe("'number' and 'relativenumber'", function() [3] = { background = Screen.colors.Green, foreground = Screen.colors.Black }, [4] = { bold = true, foreground = Screen.colors.Blue }, }) - screen:attach() exec([[ set display=lastline scrolloff=0 call setline(1, range(200)->map('v:val->string()->repeat(40)')) @@ -215,7 +213,6 @@ describe("'number' and 'relativenumber'", function() -- oldtest: Test_relativenumber_callback() it('relative line numbers are updated if cursor is moved from timer', function() local screen = Screen.new(50, 8) - screen:attach() exec([[ call setline(1, ['aaaaa', 'bbbbb', 'ccccc', 'ddddd']) set relativenumber @@ -253,7 +250,6 @@ describe("'number' and 'relativenumber'", function() -- oldtest: Test_number_insert_delete_lines() it('line numbers are updated when deleting/inserting lines', function() local screen = Screen.new(50, 8) - screen:attach() exec([[ call setline(1, range(1, 7)) set number diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua index e9a3b73cf7..fa84e0db66 100644 --- a/test/functional/legacy/options_spec.lua +++ b/test/functional/legacy/options_spec.lua @@ -32,8 +32,7 @@ describe('set', function() end) it('winminheight works', function() - local screen = Screen.new(20, 11) - screen:attach() + local _ = Screen.new(20, 11) source([[ set wmh=0 stal=2 below sp | wincmd _ @@ -45,8 +44,7 @@ describe('set', function() end) it('winminheight works with tabline', function() - local screen = Screen.new(20, 11) - screen:attach() + local _ = Screen.new(20, 11) source([[ set wmh=0 stal=2 split @@ -60,7 +58,6 @@ describe('set', function() it('scroll works', function() local screen = Screen.new(42, 16) - screen:attach() source([[ set scroll=2 set laststatus=2 diff --git a/test/functional/legacy/prompt_buffer_spec.lua b/test/functional/legacy/prompt_buffer_spec.lua index 72ec420b15..6a4d5fe7f7 100644 --- a/test/functional/legacy/prompt_buffer_spec.lua +++ b/test/functional/legacy/prompt_buffer_spec.lua @@ -18,7 +18,6 @@ describe('prompt buffer', function() before_each(function() clear() screen = Screen.new(25, 10) - screen:attach() command('set laststatus=0 nohidden') end) @@ -68,10 +67,6 @@ describe('prompt buffer', function() ]]) end - after_each(function() - screen:detach() - end) - -- oldtest: Test_prompt_basic() it('works', function() source_script() diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua index 8b9b495679..2656142176 100644 --- a/test/functional/legacy/put_spec.lua +++ b/test/functional/legacy/put_spec.lua @@ -10,7 +10,6 @@ describe('put', function() -- oldtest: Test_put_other_window() it('above topline in buffer in two splits', function() local screen = Screen.new(80, 10) - screen:attach() source([[ 40vsplit 0put ='some text at the top' @@ -36,7 +35,6 @@ describe('put', function() -- oldtest: Test_put_in_last_displayed_line() it('in last displayed line', function() local screen = Screen.new(75, 10) - screen:attach() source([[ autocmd CursorMoved * eval line('w$') let @a = 'x'->repeat(&columns * 2 - 2) diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index ec1dc59d53..a92b95731e 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -13,7 +13,6 @@ describe('smoothscroll', function() before_each(function() screen = Screen.new(40, 12) - screen:attach() end) -- oldtest: Test_CtrlE_CtrlY_stop_at_end() diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index d421a96579..db7d6bc34b 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -18,7 +18,6 @@ describe('search cmdline', function() clear() command('set nohlsearch inccommand=') screen = Screen.new(20, 3) - screen:attach() screen:set_default_attr_ids({ inc = { reverse = true }, err = { foreground = Screen.colors.Grey100, background = Screen.colors.Red }, @@ -747,7 +746,6 @@ describe('Search highlight', function() -- oldtest: Test_hlsearch_dump() it('beyond line end vim-patch:8.2.2542', function() local screen = Screen.new(50, 6) - screen:attach() exec([[ set hlsearch noincsearch cursorline call setline(1, ["xxx", "xxx", "xxx"]) @@ -773,7 +771,6 @@ describe('Search highlight', function() [4] = { background = Screen.colors.Yellow, bold = true }, -- Search [5] = { background = Screen.colors.LightGrey, bold = true, foreground = Screen.colors.Black }, }) - screen:attach() exec([[ set hlsearch noincsearch call setline(1, repeat(["xxx yyy zzz"], 3)) diff --git a/test/functional/legacy/search_stat_spec.lua b/test/functional/legacy/search_stat_spec.lua index 7779b8bef1..1ffae89b0c 100644 --- a/test/functional/legacy/search_stat_spec.lua +++ b/test/functional/legacy/search_stat_spec.lua @@ -15,7 +15,6 @@ describe('search stat', function() [4] = { reverse = true }, -- IncSearch, TabLineFill [5] = { foreground = Screen.colors.Red }, -- WarningMsg }) - screen:attach() end) -- oldtest: Test_search_stat_screendump() diff --git a/test/functional/legacy/signs_spec.lua b/test/functional/legacy/signs_spec.lua index 27145f4c91..ac7c8cd0bc 100644 --- a/test/functional/legacy/signs_spec.lua +++ b/test/functional/legacy/signs_spec.lua @@ -26,7 +26,6 @@ describe('signs', function() -- oldtest: Test_sign_cursor_position() it('are drawn correctly', function() local screen = Screen.new(75, 6) - screen:attach() exec([[ call setline(1, [repeat('x', 75), 'mmmm', 'yyyy']) call cursor(2,1) diff --git a/test/functional/legacy/source_spec.lua b/test/functional/legacy/source_spec.lua index a910dc3d43..7358ba2d57 100644 --- a/test/functional/legacy/source_spec.lua +++ b/test/functional/legacy/source_spec.lua @@ -18,7 +18,6 @@ describe(':source!', function() ]] ) local screen = Screen.new(75, 6) - screen:attach() feed(':source! Xscript.vim\n') screen:expect([[ ^ | diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua index 148166fdc3..0bc77fe67e 100644 --- a/test/functional/legacy/statusline_spec.lua +++ b/test/functional/legacy/statusline_spec.lua @@ -12,7 +12,6 @@ describe('statusline', function() before_each(function() screen = Screen.new(50, 7) - screen:attach() end) it('is updated in cmdline mode when using window-local statusline vim-patch:8.2.2737', function() diff --git a/test/functional/legacy/substitute_spec.lua b/test/functional/legacy/substitute_spec.lua index 647d62782c..0081371f7f 100644 --- a/test/functional/legacy/substitute_spec.lua +++ b/test/functional/legacy/substitute_spec.lua @@ -211,7 +211,6 @@ describe(':substitute', function() it('first char is highlighted with confirmation dialog and empty match', function() local screen = Screen.new(60, 8) - screen:attach() exec([[ set nohlsearch noincsearch call setline(1, ['one', 'two', 'three']) diff --git a/test/functional/legacy/tabline_spec.lua b/test/functional/legacy/tabline_spec.lua index 4ce32f2fdd..949bec6dea 100644 --- a/test/functional/legacy/tabline_spec.lua +++ b/test/functional/legacy/tabline_spec.lua @@ -12,7 +12,6 @@ describe('tabline', function() before_each(function() screen = Screen.new(50, 7) - screen:attach() end) -- oldtest: Test_tabline_showcmd() diff --git a/test/functional/legacy/vimscript_spec.lua b/test/functional/legacy/vimscript_spec.lua index 66054810a6..e2e3493be8 100644 --- a/test/functional/legacy/vimscript_spec.lua +++ b/test/functional/legacy/vimscript_spec.lua @@ -12,7 +12,6 @@ describe('Vim script', function() -- oldtest: Test_deep_nest() it('Error when if/for/while/try/function is nested too deep', function() local screen = Screen.new(80, 24) - screen:attach() api.nvim_set_option_value('laststatus', 2, {}) exec([[ " Deep nesting of if ... endif @@ -84,7 +83,6 @@ describe('Vim script', function() -- oldtest: Test_typed_script_var() it('using s: with a typed command', function() local screen = Screen.new(80, 24) - screen:attach() feed(":echo get(s:, 'foo', 'x')\n") screen:expect({ any = 'E116: ' }) end) diff --git a/test/functional/legacy/visual_spec.lua b/test/functional/legacy/visual_spec.lua index ab2213b2fc..e52d12bba9 100644 --- a/test/functional/legacy/visual_spec.lua +++ b/test/functional/legacy/visual_spec.lua @@ -12,7 +12,6 @@ describe('Visual highlight', function() before_each(function() screen = Screen.new(50, 6) - screen:attach() end) -- oldtest: Test_visual_block_with_virtualedit() diff --git a/test/functional/legacy/window_cmd_spec.lua b/test/functional/legacy/window_cmd_spec.lua index 332240d04a..d68c780f49 100644 --- a/test/functional/legacy/window_cmd_spec.lua +++ b/test/functional/legacy/window_cmd_spec.lua @@ -11,7 +11,6 @@ local feed = n.feed it('scrolling with laststatus=0 and :botright split', function() clear('--cmd', 'set ruler') local screen = Screen.new(40, 10) - screen:attach() exec([[ set laststatus=0 call setline(1, range(1, 100)) @@ -38,7 +37,6 @@ describe('splitkeep', function() before_each(function() clear('--cmd', 'set splitkeep=screen') screen = Screen.new() - screen:attach() end) -- oldtest: Test_splitkeep_cursor() |