diff options
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
| -rw-r--r-- | test/functional/ui/mouse_spec.lua | 33 | 
1 files changed, 18 insertions, 15 deletions
| diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 9530e13453..296487fc9c 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -4,13 +4,12 @@ local clear, feed, nvim = helpers.clear, helpers.feed, helpers.nvim  local insert, execute = helpers.insert, helpers.execute  describe('Mouse input', function() -  local screen, hlgroup_colors +  local screen -  setup(function() -    hlgroup_colors = { -      Visual = nvim('name_to_color', 'LightGrey'), -    } -  end) +  local hlgroup_colors = { +    NonText = Screen.colors.Blue, +    Visual = Screen.colors.LightGrey +  }    before_each(function()      clear() @@ -21,8 +20,10 @@ describe('Mouse input', function()      screen = Screen.new(25, 5)      screen:attach()      screen:set_default_attr_ids({ -      [1] = {background = hlgroup_colors.Visual} +      [1] = {background = hlgroup_colors.Visual}, +      [2] = {bold = true}      }) +    screen:set_default_attr_ignore( {{bold=true, foreground=hlgroup_colors.NonText}} )      feed('itesting<cr>mouse<cr>support and selection<esc>')      screen:expect([[        testing                  | @@ -72,7 +73,7 @@ describe('Mouse input', function()        mo{1:us}^                    |        support and selection    |        ~                        | -      -- VISUAL --             | +      {2:-- VISUAL --}             |      ]])      feed('<LeftDrag><2,2>')      screen:expect([[ @@ -80,7 +81,7 @@ describe('Mouse input', function()        mo{1:use }                   |        {1:su}^port and selection    |        ~                        | -      -- VISUAL --             | +      {2:-- VISUAL --}             |      ]])      feed('<LeftDrag><0,0>')      screen:expect([[ @@ -88,7 +89,7 @@ describe('Mouse input', function()        {1:mou}se                    |        support and selection    |        ~                        | -      -- VISUAL --             | +      {2:-- VISUAL --}             |      ]])    end) @@ -99,7 +100,7 @@ describe('Mouse input', function()        mouse                    |        {1:suppor}^ and selection    |        ~                        | -      -- VISUAL --             | +      {2:-- VISUAL --}             |      ]])    end) @@ -110,7 +111,7 @@ describe('Mouse input', function()        mouse                    |        {1:su}^{1:port and selection }   |        ~                        | -      -- VISUAL LINE --        | +      {2:-- VISUAL LINE --}        |      ]])    end) @@ -121,7 +122,7 @@ describe('Mouse input', function()        mouse                    |        su^port and selection    |        ~                        | -      -- VISUAL BLOCK --       | +      {2:-- VISUAL BLOCK --}       |      ]])    end) @@ -140,7 +141,7 @@ describe('Mouse input', function()        {1:mouse }                   |        {1:su}^port and selection    |        ~                        | -      -- VISUAL --             | +      {2:-- VISUAL --}             |      ]])    end) @@ -153,7 +154,7 @@ describe('Mouse input', function()        ing                      |        Press ENTER or type comma|        nd to continue^          | -    ]]) +    ]],nil,true)      feed('<cr>')    end) @@ -171,6 +172,8 @@ describe('Mouse input', function()      ]])      screen:try_resize(53, 14)      execute('sp', 'vsp') +    screen:set_default_attr_ignore( {{bold=true, foreground=hlgroup_colors.NonText}, +            {reverse=true}, {bold=true, reverse=true}} )      screen:expect([[        lines                     |lines                     |        to                        |to                        | | 
