diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:18 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2024-01-03 02:09:29 +0100 |
commit | 04f2f864e270e772c6326cefdf24947f0130e492 (patch) | |
tree | 46f83f909b888a66c741032ab955afc6eab84292 /test/functional/editor/tabpage_spec.lua | |
parent | 59d117ec99b6037cb9fad5bbfb6d0b18f5012927 (diff) | |
download | rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.gz rneovim-04f2f864e270e772c6326cefdf24947f0130e492.tar.bz2 rneovim-04f2f864e270e772c6326cefdf24947f0130e492.zip |
refactor: format test/*
Diffstat (limited to 'test/functional/editor/tabpage_spec.lua')
-rw-r--r-- | test/functional/editor/tabpage_spec.lua | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua index 263b753a16..f632bbb40f 100644 --- a/test/functional/editor/tabpage_spec.lua +++ b/test/functional/editor/tabpage_spec.lua @@ -58,7 +58,9 @@ describe('tabpage', function() end) it('no segfault with strange WinClosed autocommand #20290', function() - pcall(exec, [[ + pcall( + exec, + [[ set nohidden edit Xa split Xb @@ -66,45 +68,46 @@ describe('tabpage', function() new autocmd WinClosed * tabprev | bwipe! close - ]]) + ]] + ) assert_alive() end) it('nvim_win_close and nvim_win_hide update tabline #20285', function() eq(1, #meths.list_tabpages()) - eq({1, 1}, funcs.win_screenpos(0)) + eq({ 1, 1 }, funcs.win_screenpos(0)) local win1 = curwin().id command('tabnew') eq(2, #meths.list_tabpages()) - eq({2, 1}, funcs.win_screenpos(0)) + eq({ 2, 1 }, funcs.win_screenpos(0)) local win2 = curwin().id meths.win_close(win1, true) eq(win2, curwin().id) eq(1, #meths.list_tabpages()) - eq({1, 1}, funcs.win_screenpos(0)) + eq({ 1, 1 }, funcs.win_screenpos(0)) command('tabnew') eq(2, #meths.list_tabpages()) - eq({2, 1}, funcs.win_screenpos(0)) + eq({ 2, 1 }, funcs.win_screenpos(0)) local win3 = curwin().id meths.win_hide(win2) eq(win3, curwin().id) eq(1, #meths.list_tabpages()) - eq({1, 1}, funcs.win_screenpos(0)) + eq({ 1, 1 }, funcs.win_screenpos(0)) end) it('switching tabpage after setting laststatus=3 #19591', function() local screen = Screen.new(40, 8) screen:set_default_attr_ids({ - [0] = {bold = true, foreground = Screen.colors.Blue}, - [1] = {bold = true, reverse = true}, -- StatusLine - [2] = {reverse = true}, -- TabLineFill - [3] = {bold = true}, -- TabLineSel - [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine - [5] = {bold = true, foreground = Screen.colors.Magenta}, + [0] = { bold = true, foreground = Screen.colors.Blue }, + [1] = { bold = true, reverse = true }, -- StatusLine + [2] = { reverse = true }, -- TabLineFill + [3] = { bold = true }, -- TabLineSel + [4] = { background = Screen.colors.LightGrey, underline = true }, -- TabLine + [5] = { bold = true, foreground = Screen.colors.Magenta }, }) screen:attach() @@ -130,7 +133,7 @@ describe('tabpage', function() ]]) end) - it(":tabmove handles modifiers and addr", function() + it(':tabmove handles modifiers and addr', function() command('tabnew | tabnew | tabnew') eq(4, funcs.nvim_tabpage_get_number(0)) command(' silent :keepalt :: ::: silent! - tabmove') |