diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-08-09 15:11:04 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-08-14 21:53:02 +0200 |
commit | f282b8ecac37e7776674a7eb48397f29eb6d173e (patch) | |
tree | 67a212dedbf82ca2b5dfaf7c699b566860698d4c | |
parent | 0a882b48183074adf91ee8c011e520cc7f64e94f (diff) | |
download | rneovim-f282b8ecac37e7776674a7eb48397f29eb6d173e.tar.gz rneovim-f282b8ecac37e7776674a7eb48397f29eb6d173e.tar.bz2 rneovim-f282b8ecac37e7776674a7eb48397f29eb6d173e.zip |
tests: don't ignore highlights in various tests
-rw-r--r-- | test/functional/api/vim_spec.lua | 52 | ||||
-rw-r--r-- | test/functional/eval/execute_spec.lua | 8 | ||||
-rw-r--r-- | test/functional/eval/timer_spec.lua | 10 | ||||
-rw-r--r-- | test/functional/ex_cmds/drop_spec.lua | 44 | ||||
-rw-r--r-- | test/functional/legacy/packadd_spec.lua | 35 | ||||
-rw-r--r-- | test/functional/plugin/matchparen_spec.lua | 7 | ||||
-rw-r--r-- | test/functional/ui/sign_spec.lua | 32 | ||||
-rw-r--r-- | test/functional/ui/wildmode_spec.lua | 8 |
8 files changed, 101 insertions, 95 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index c4976ea06b..eb2b06edcb 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -213,22 +213,22 @@ describe('vim_* functions', function() screen = Screen.new(40, 8) screen:attach() screen:set_default_attr_ids({ + [0] = {bold=true, foreground=Screen.colors.Blue}, [1] = {foreground = Screen.colors.White, background = Screen.colors.Red}, [2] = {bold = true, foreground = Screen.colors.SeaGreen} }) - screen:set_default_attr_ignore( {{bold=true, foreground=Screen.colors.Blue}} ) end) it('can show one line', function() nvim_async('err_write', 'has bork\n') screen:expect([[ ^ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| {1:has bork} | ]]) end) @@ -236,11 +236,11 @@ describe('vim_* functions', function() it('shows return prompt when more than &cmdheight lines', function() nvim_async('err_write', 'something happened\nvery bad\n') screen:expect([[ - ~ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| {1:something happened} | {1:very bad} | {2:Press ENTER or type command to continue}^ | @@ -250,9 +250,9 @@ describe('vim_* functions', function() it('shows return prompt after all lines are shown', function() nvim_async('err_write', 'FAILURE\nERROR\nEXCEPTION\nTRACEBACK\n') screen:expect([[ - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| {1:FAILURE} | {1:ERROR} | {1:EXCEPTION} | @@ -267,12 +267,12 @@ describe('vim_* functions', function() nvim_async('err_write', 'fail\n') screen:expect([[ ^ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| {1:very fail} | ]]) helpers.wait() @@ -280,11 +280,11 @@ describe('vim_* functions', function() -- shows up to &cmdheight lines nvim_async('err_write', 'more fail\ntoo fail\n') screen:expect([[ - ~ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| {1:more fail} | {1:too fail} | {2:Press ENTER or type command to continue}^ | diff --git a/test/functional/eval/execute_spec.lua b/test/functional/eval/execute_spec.lua index a91a04341f..10a6de6eb4 100644 --- a/test/functional/eval/execute_spec.lua +++ b/test/functional/eval/execute_spec.lua @@ -72,13 +72,13 @@ describe('execute()', function() it('silences command run inside', function() local screen = Screen.new(20, 5) screen:attach() - screen:set_default_attr_ignore({{bold=true, foreground=255}}) + screen:set_default_attr_ids( {[0] = {bold=true, foreground=255}} ) feed(':let g:mes = execute("echon 42")<CR>') screen:expect([[ ^ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| | ]]) eq('42', eval('g:mes')) diff --git a/test/functional/eval/timer_spec.lua b/test/functional/eval/timer_spec.lua index 80c16e6ee3..295c763d74 100644 --- a/test/functional/eval/timer_spec.lua +++ b/test/functional/eval/timer_spec.lua @@ -137,7 +137,7 @@ describe('timers', function() it("doesn't mess up the cmdline", function() local screen = Screen.new(40, 6) screen:attach() - screen:set_default_attr_ignore({{bold=true, foreground=Screen.colors.Blue}}) + screen:set_default_attr_ids( {[0] = {bold=true, foreground=255}} ) source([[ func! MyHandler(timer) echo "evil" @@ -148,10 +148,10 @@ describe('timers', function() screen:sleep(200) screen:expect([[ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| :good^ | ]]) end) diff --git a/test/functional/ex_cmds/drop_spec.lua b/test/functional/ex_cmds/drop_spec.lua index 16b194dd7d..99db5ea333 100644 --- a/test/functional/ex_cmds/drop_spec.lua +++ b/test/functional/ex_cmds/drop_spec.lua @@ -9,8 +9,8 @@ describe(":drop", function() clear() screen = Screen.new(35, 10) screen:attach() - screen:set_default_attr_ignore({{bold=true, foreground=Screen.colors.Blue}}) screen:set_default_attr_ids({ + [0] = {bold=true, foreground=Screen.colors.Blue}, [1] = {bold = true, reverse = true}, [2] = {reverse = true}, [3] = {bold = true}, @@ -26,13 +26,13 @@ describe(":drop", function() execute("drop tmp1.vim") screen:expect([[ ^ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| {1:tmp1.vim }| "tmp1.vim" [New File] | ]]) @@ -45,13 +45,13 @@ describe(":drop", function() execute("drop tmp1") screen:expect([[ {2:|}^ | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| {2:tmp2 }{1:tmp1 }| :drop tmp1 | ]]) @@ -65,13 +65,13 @@ describe(":drop", function() execute("drop tmp3") screen:expect([[ ^ {2:|} | - ~ {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | - {1:tmp3 }{2:|}~ | - ABC {2:|}~ | - ~ {2:|}~ | - ~ {2:|}~ | + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {1:tmp3 }{2:|}{0:~ }| + ABC {2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| + {0:~ }{2:|}{0:~ }| {2:tmp2 [+] tmp1 }| "tmp3" [New File] | ]]) diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua index b2ed39f288..a6979d8eb2 100644 --- a/test/functional/legacy/packadd_spec.lua +++ b/test/functional/legacy/packadd_spec.lua @@ -248,14 +248,13 @@ describe('packadd', function() screen = Screen.new(30, 5) screen:attach() screen:set_default_attr_ids({ + [0] = {bold=true, foreground=Screen.colors.Blue}, [1] = { foreground = Screen.colors.Black, background = Screen.colors.Yellow, }, [2] = {bold = true, reverse = true} }) - local NonText = Screen.colors.Blue - screen:set_default_attr_ignore({{}, {bold=true, foreground=NonText}}) execute([[let optdir1 = &packpath . '/pack/mine/opt']]) execute([[let optdir2 = &packpath . '/pack/candidate/opt']]) @@ -269,32 +268,32 @@ describe('packadd', function() feed(':packadd <Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {1:pluginA}{2: pluginB pluginC }| :packadd pluginA^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:pluginA }{1:pluginB}{2: pluginC }| :packadd pluginB^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:pluginA pluginB }{1:pluginC}{2: }| :packadd pluginC^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:pluginA pluginB pluginC }| :packadd ^ | ]=]) @@ -316,32 +315,32 @@ describe('packadd', function() feed(':colorscheme <Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {1:one}{2: three two }| :colorscheme one^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:one }{1:three}{2: two }| :colorscheme three^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:one three }{1:two}{2: }| :colorscheme two^ | ]=]) feed('<Tab>') screen:expect([=[ | - ~ | - ~ | + {0:~ }| + {0:~ }| {2:one three two }| :colorscheme ^ | ]=]) diff --git a/test/functional/plugin/matchparen_spec.lua b/test/functional/plugin/matchparen_spec.lua index 4181f69263..5990942de6 100644 --- a/test/functional/plugin/matchparen_spec.lua +++ b/test/functional/plugin/matchparen_spec.lua @@ -16,7 +16,10 @@ describe('matchparen', function() reset() screen = Screen.new(20,5) screen:attach() - screen:set_default_attr_ignore( {{bold=true, foreground=Screen.colors.Blue}} ) + screen:set_default_attr_ids( { + [0] = {bold=true, foreground=255}, + [1] = {bold=true}, + } ) end) it('uses correct column after i_<Up>. Vim patch 7.4.1296', function() @@ -37,7 +40,7 @@ describe('matchparen', function() ^ | } | {1:-- INSERT --} | - ]], {[1] = {bold = true}}) + ]]) end) end) diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua index 2b6e294627..eabd05b349 100644 --- a/test/functional/ui/sign_spec.lua +++ b/test/functional/ui/sign_spec.lua @@ -9,7 +9,11 @@ describe('Signs', function() clear() screen = Screen.new() screen:attach() - screen:set_default_attr_ignore( {{}, {bold=true, foreground=255}} ) + screen:set_default_attr_ids( { + [0] = {bold=true, foreground=255}, + [1] = {background = Screen.colors.Yellow}, + [2] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.Grey}, + } ) end) after_each(function() @@ -25,19 +29,19 @@ describe('Signs', function() execute('sign place 2 line=3 name=piet buffer=1') execute('sign place 3 line=1 name=pietx buffer=1') screen:expect([[ - >!a | - b | - >>c | - ^ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | + {1:>!}a | + {2: }b | + {1:>>}c | + {2: }^ | + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| + {2: }{0:~ }| :sign place 3 line=1 name=pietx buffer=1 | ]]) end) diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 2a55d27567..1d582703d0 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -39,7 +39,7 @@ describe('command line completion', function() clear() screen = Screen.new(40, 5) screen:attach() - screen:set_default_attr_ignore({{bold=true, foreground=Screen.colors.Blue}}) + screen:set_default_attr_ids({[1]={bold=true, foreground=Screen.colors.Blue}}) end) after_each(function() @@ -55,9 +55,9 @@ describe('command line completion', function() feed(':!<tab><bs>') screen:expect([[ | - ~ | - ~ | - ~ | + {1:~ }| + {1:~ }| + {1:~ }| :!Xtest-functional-viml-compl-dir^ | ]]) end) |