diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-11-13 14:52:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 05:52:19 -0800 |
commit | 736c36c02f316c979da363c5120495179a2b6c2a (patch) | |
tree | 97015d6701788a2c0b37b92c25033fff4f779ab9 /test/functional/terminal/mouse_spec.lua | |
parent | 0a96f18ed774ebc27db50eba4d8a4437e970a331 (diff) | |
download | rneovim-736c36c02f316c979da363c5120495179a2b6c2a.tar.gz rneovim-736c36c02f316c979da363c5120495179a2b6c2a.tar.bz2 rneovim-736c36c02f316c979da363c5120495179a2b6c2a.zip |
test: introduce skip() #21010
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.
Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
Diffstat (limited to 'test/functional/terminal/mouse_spec.lua')
-rw-r--r-- | test/functional/terminal/mouse_spec.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua index 6e2c851df7..a062a77a14 100644 --- a/test/functional/terminal/mouse_spec.lua +++ b/test/functional/terminal/mouse_spec.lua @@ -3,6 +3,8 @@ local thelpers = require('test.functional.terminal.helpers') local clear, eq, eval = helpers.clear, helpers.eq, helpers.eval local feed, nvim, command = helpers.feed, helpers.nvim, helpers.command local feed_data = thelpers.feed_data +local iswin = helpers.iswin +local skip = helpers.skip describe(':terminal mouse', function() local screen @@ -66,7 +68,7 @@ describe(':terminal mouse', function() end) it('does not leave terminal mode on left-release', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) feed('<LeftRelease>') eq('t', eval('mode(1)')) end) @@ -87,7 +89,7 @@ describe(':terminal mouse', function() end) it('will forward mouse press, drag and release to the program', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) feed('<LeftMouse><1,2>') screen:expect([[ line27 | @@ -131,7 +133,7 @@ describe(':terminal mouse', function() end) it('will forward mouse scroll to the program', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) feed('<ScrollWheelUp><0,0>') screen:expect([[ line27 | @@ -145,7 +147,7 @@ describe(':terminal mouse', function() end) it('dragging and scrolling do not interfere with each other', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) feed('<LeftMouse><1,2>') screen:expect([[ line27 | @@ -199,7 +201,7 @@ describe(':terminal mouse', function() end) it('will forward mouse clicks to the program with the correct even if set nu', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) command('set number') -- When the display area such as a number is clicked, it returns to the -- normal mode. @@ -230,7 +232,7 @@ describe(':terminal mouse', function() end) describe('with a split window and other buffer', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) before_each(function() feed('<c-\\><c-n>:vsp<cr>') screen:expect([[ |