diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-11-22 01:13:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 08:13:30 +0800 |
commit | 5eb5f4948826e9d47685ea9e257409cc3e693614 (patch) | |
tree | 9c5bbb393bbf992c06c78fd8f25375d9637d8bba /test/functional/terminal/mouse_spec.lua | |
parent | 7c10774860b4238090f0d36a26203080542ef1ac (diff) | |
download | rneovim-5eb5f4948826e9d47685ea9e257409cc3e693614.tar.gz rneovim-5eb5f4948826e9d47685ea9e257409cc3e693614.tar.bz2 rneovim-5eb5f4948826e9d47685ea9e257409cc3e693614.zip |
test: simplify platform detection (#21020)
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.
Diffstat (limited to 'test/functional/terminal/mouse_spec.lua')
-rw-r--r-- | test/functional/terminal/mouse_spec.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua index a062a77a14..899df0ac54 100644 --- a/test/functional/terminal/mouse_spec.lua +++ b/test/functional/terminal/mouse_spec.lua @@ -3,7 +3,7 @@ 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 is_os = helpers.is_os local skip = helpers.skip describe(':terminal mouse', function() @@ -68,7 +68,7 @@ describe(':terminal mouse', function() end) it('does not leave terminal mode on left-release', function() - skip(iswin()) + skip(is_os('win')) feed('<LeftRelease>') eq('t', eval('mode(1)')) end) @@ -89,7 +89,7 @@ describe(':terminal mouse', function() end) it('will forward mouse press, drag and release to the program', function() - skip(iswin()) + skip(is_os('win')) feed('<LeftMouse><1,2>') screen:expect([[ line27 | @@ -133,7 +133,7 @@ describe(':terminal mouse', function() end) it('will forward mouse scroll to the program', function() - skip(iswin()) + skip(is_os('win')) feed('<ScrollWheelUp><0,0>') screen:expect([[ line27 | @@ -147,7 +147,7 @@ describe(':terminal mouse', function() end) it('dragging and scrolling do not interfere with each other', function() - skip(iswin()) + skip(is_os('win')) feed('<LeftMouse><1,2>') screen:expect([[ line27 | @@ -201,7 +201,7 @@ describe(':terminal mouse', function() end) it('will forward mouse clicks to the program with the correct even if set nu', function() - skip(iswin()) + skip(is_os('win')) command('set number') -- When the display area such as a number is clicked, it returns to the -- normal mode. @@ -232,7 +232,7 @@ describe(':terminal mouse', function() end) describe('with a split window and other buffer', function() - skip(iswin()) + skip(is_os('win')) before_each(function() feed('<c-\\><c-n>:vsp<cr>') screen:expect([[ |