diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-10 11:54:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 11:54:26 +0800 |
commit | ba23d109baa5a863886298fa3590e0258873f2bb (patch) | |
tree | 1780d193532f0d25b0fa132fce333725a10812e0 /test/functional/terminal/tui_spec.lua | |
parent | dcb11c1091416db04101dab3566563c74b47452b (diff) | |
download | rneovim-ba23d109baa5a863886298fa3590e0258873f2bb.tar.gz rneovim-ba23d109baa5a863886298fa3590e0258873f2bb.tar.bz2 rneovim-ba23d109baa5a863886298fa3590e0258873f2bb.zip |
test: add test for scroll wheel at right-click menu (#27409)
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 9dd5b00b83..d63338845a 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -655,6 +655,20 @@ describe('TUI', function() end screen:expect_unchanged() if esc then + feed_data('\027[<64;5;1M') + else + api.nvim_input_mouse('wheel', 'up', '', 0, 0, 4) + end + screen:expect([[ + {1:p}opup menu test | + {4:~ }{14: foo }{4: }| + {4:~ }{13: bar }{4: }| + {4:~ }{13: baz }{4: }| + {5:[No Name] [+] }| + | + {3:-- TERMINAL --} | + ]]) + if esc then feed_data('\027[<35;7;4M') else api.nvim_input_mouse('move', '', '', 0, 3, 6) @@ -669,6 +683,20 @@ describe('TUI', function() {3:-- TERMINAL --} | ]]) if esc then + feed_data('\027[<65;7;4M') + else + api.nvim_input_mouse('wheel', 'down', '', 0, 3, 6) + end + screen:expect([[ + {1:p}opup menu test | + {4:~ }{13: foo }{4: }| + {4:~ }{14: bar }{4: }| + {4:~ }{13: baz }{4: }| + {5:[No Name] [+] }| + | + {3:-- TERMINAL --} | + ]]) + if esc then feed_data('\027[<0;7;3M') else api.nvim_input_mouse('left', 'press', '', 0, 2, 6) |