diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-30 08:29:45 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-30 08:33:14 +0200 |
commit | f5fd699c527945d795dab9f3529333df6d0561d0 (patch) | |
tree | a134ef031cb0751692e71928d246a565403d9c87 | |
parent | b6192a9920a75d787e256453a841b9742a7f0599 (diff) | |
download | rneovim-f5fd699c527945d795dab9f3529333df6d0561d0.tar.gz rneovim-f5fd699c527945d795dab9f3529333df6d0561d0.tar.bz2 rneovim-f5fd699c527945d795dab9f3529333df6d0561d0.zip |
test: vim.paste() cancel
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 6ec6a41807..8d8c0e3647 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -400,6 +400,17 @@ describe('TUI', function() ]]} end) + it('paste: vim.paste() cancel (retval=false) #10865', function() + -- This test only exercises the "cancel" case. Use-case would be "dangling + -- paste", but that is not implemented yet. #10865 + child_session:request('nvim_execute_lua', [[ + vim.paste = function(lines, phase) return false end + ]], {}) + feed_data('\027[200~line A\nline B\n\027[201~') + feed_data('ifoo\n\027\000') + expect_child_buf_lines({'foo',''}) + end) + it("paste: 'nomodifiable' buffer", function() child_session:request('nvim_command', 'set nomodifiable') feed_data('\027[200~fail 1\nfail 2\n\027[201~') |