diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-08 11:45:55 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-11-08 13:19:15 +0100 |
commit | abe6a07c54c0e927cf43f7f61b05ac91547daeed (patch) | |
tree | 9d254b7a0a7afb250404ddef59ee49dfbedad123 /test/functional/vimscript | |
parent | 8ab1903092f0ab193adf17ee635da838cce01dfa (diff) | |
download | rneovim-abe6a07c54c0e927cf43f7f61b05ac91547daeed.tar.gz rneovim-abe6a07c54c0e927cf43f7f61b05ac91547daeed.tar.bz2 rneovim-abe6a07c54c0e927cf43f7f61b05ac91547daeed.zip |
refactor(tests): continue the global highlight definition work
Diffstat (limited to 'test/functional/vimscript')
-rw-r--r-- | test/functional/vimscript/api_functions_spec.lua | 15 | ||||
-rw-r--r-- | test/functional/vimscript/eval_spec.lua | 21 | ||||
-rw-r--r-- | test/functional/vimscript/timer_spec.lua | 6 |
3 files changed, 13 insertions, 29 deletions
diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua index 30d6c969ca..0dbbace8f8 100644 --- a/test/functional/vimscript/api_functions_spec.lua +++ b/test/functional/vimscript/api_functions_spec.lua @@ -193,13 +193,6 @@ describe('eval-API', function() it('are highlighted by vim.vim syntax file', function() local screen = Screen.new(40, 8) screen:attach() - screen:set_default_attr_ids({ - [1] = { bold = true, foreground = Screen.colors.Brown }, - [2] = { foreground = Screen.colors.DarkCyan }, - [3] = { foreground = Screen.colors.SlateBlue }, - [4] = { foreground = Screen.colors.Fuchsia }, - [5] = { bold = true, foreground = Screen.colors.Blue }, - }) command('set ft=vim') command('set rtp^=build/runtime/') @@ -210,10 +203,10 @@ describe('eval-API', function() call not_a_function(42)]]) screen:expect([[ - {1:call} {2:bufnr}{3:(}{4:'%'}{3:)} | - {1:call} {2:nvim_input}{3:(}{4:'typing...'}{3:)} | - {1:call} not_a_function{3:(}{4:42}{3:^)} | - {5:~ }|*4 + {15:call} {25:bufnr}{16:(}{26:'%'}{16:)} | + {15:call} {25:nvim_input}{16:(}{26:'typing...'}{16:)} | + {15:call} not_a_function{16:(}{26:42}{16:^)} | + {1:~ }|*4 | ]]) end) diff --git a/test/functional/vimscript/eval_spec.lua b/test/functional/vimscript/eval_spec.lua index 0c812d968e..840e311dd8 100644 --- a/test/functional/vimscript/eval_spec.lua +++ b/test/functional/vimscript/eval_spec.lua @@ -189,11 +189,6 @@ describe('uncaught exception', function() it('multiline exception remains multiline #25350', function() local screen = Screen.new(80, 11) - screen:set_default_attr_ids({ - [1] = { bold = true, reverse = true }, -- MsgSeparator - [2] = { foreground = Screen.colors.White, background = Screen.colors.Red }, -- ErrorMsg - [3] = { bold = true, foreground = Screen.colors.SeaGreen }, -- MoreMsg - }) screen:attach() exec_lua([[ function _G.Oops() @@ -203,17 +198,17 @@ describe('uncaught exception', function() feed(':try\rlua _G.Oops()\rendtry\r') screen:expect { grid = [[ - {1: }| + {3: }| :try | : lua _G.Oops() | : endtry | - {2:Error detected while processing :} | - {2:E5108: Error executing lua [string "<nvim>"]:2: oops} | - {2:stack traceback:} | - {2: [C]: in function 'error'} | - {2: [string "<nvim>"]:2: in function 'Oops'} | - {2: [string ":lua"]:1: in main chunk} | - {3:Press ENTER or type command to continue}^ | + {9:Error detected while processing :} | + {9:E5108: Error executing lua [string "<nvim>"]:2: oops} | + {9:stack traceback:} | + {9: [C]: in function 'error'} | + {9: [string "<nvim>"]:2: in function 'Oops'} | + {9: [string ":lua"]:1: in main chunk} | + {6:Press ENTER or type command to continue}^ | ]], } end) diff --git a/test/functional/vimscript/timer_spec.lua b/test/functional/vimscript/timer_spec.lua index f075e382bc..1e484c9ff9 100644 --- a/test/functional/vimscript/timer_spec.lua +++ b/test/functional/vimscript/timer_spec.lua @@ -109,9 +109,6 @@ describe('timers', function() it('can invoke redraw in blocking getchar() call', function() local screen = Screen.new(40, 6) screen:attach() - screen:set_default_attr_ids({ - [1] = { bold = true, foreground = Screen.colors.Blue }, - }) api.nvim_buf_set_lines(0, 0, -1, true, { 'ITEM 1', 'ITEM 2' }) source([[ @@ -229,7 +226,6 @@ describe('timers', function() it("doesn't mess up the cmdline", function() local screen = Screen.new(40, 6) screen:attach() - screen:set_default_attr_ids({ [0] = { bold = true, foreground = 255 } }) source([[ let g:val = 0 func! MyHandler(timer) @@ -247,7 +243,7 @@ describe('timers', function() feed(':good') screen:expect([[ | - {0:~ }|*4 + {1:~ }|*4 :good^ | ]]) command('let g:val = 1') |