diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-08-07 23:46:58 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-08-07 23:50:40 -0400 |
commit | d69194ca8ca35a1f36d237a15d7b93b6b143327d (patch) | |
tree | 9da7596f84409160608489cafb9b7eab8cc75b7a /test/functional/ui/mouse_spec.lua | |
parent | 46492a472a6db7de6e1cbc24405455835ecd453e (diff) | |
download | rneovim-d69194ca8ca35a1f36d237a15d7b93b6b143327d.tar.gz rneovim-d69194ca8ca35a1f36d237a15d7b93b6b143327d.tar.bz2 rneovim-d69194ca8ca35a1f36d237a15d7b93b6b143327d.zip |
test: mouse_spec
- Use the default buffer text provided by before_each (avoids extra steps and
makes the tests more consistent with each other)
- Indent
- Adjust help doc
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 8217ee5aba..fd6c62a6f6 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -16,9 +16,9 @@ describe('Mouse input', function() clear() meths.set_option('mouse', 'a') meths.set_option('listchars', 'eol:$') - -- set mouset to very high value to ensure that even in valgrind/travis, + -- set mousetime to very high value to ensure that even in valgrind/travis, -- nvim will still pick multiple clicks - meths.set_option('mouset', 5000) + meths.set_option('mousetime', 5000) screen = Screen.new(25, 5) screen:attach() screen:set_default_attr_ids({ @@ -65,24 +65,20 @@ describe('Mouse input', function() end) it('double left click enters visual mode', function() - execute('%delete') - insert('foo') feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') screen:expect([[ - {1:fo}^o | - ~ | - ~ | - ~ | - {2:-- VISUAL --} | + {1:testin}^g | + mouse | + support and selection | + ~ | + {2:-- VISUAL --} | ]]) end) it('triple left click enters visual line mode', function() - execute('%delete') - insert('foo') feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') feed('<LeftMouse><0,0>') @@ -90,17 +86,15 @@ describe('Mouse input', function() feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') screen:expect([[ - ^f{1:oo}{3: } | - ~ | - ~ | - ~ | - {2:-- VISUAL LINE --} | + ^t{1:esting}{3: } | + mouse | + support and selection | + ~ | + {2:-- VISUAL LINE --} | ]]) end) it('quadruple left click enters visual block mode', function() - execute('%delete') - insert('foo') feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') feed('<LeftMouse><0,0>') @@ -110,11 +104,11 @@ describe('Mouse input', function() feed('<LeftMouse><0,0>') feed('<LeftRelease><0,0>') screen:expect([[ - ^foo | - ~ | - ~ | - ~ | - {2:-- VISUAL BLOCK --} | + ^testing | + mouse | + support and selection | + ~ | + {2:-- VISUAL BLOCK --} | ]]) end) |