diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-16 12:00:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-16 12:00:13 -0700 |
commit | 7d67bd58655052103f3891122f0e6fe30ae1f829 (patch) | |
tree | 778b8b9ebdf8cec2d90c77eece08abdad94329c8 /test/functional/lua/highlight_spec.lua | |
parent | 942b16adf7312c243fb27e579fa5da794fa0f502 (diff) | |
parent | 2132c063af3adf1d612359e0ed42c7cbd8b4290c (diff) | |
download | rneovim-7d67bd58655052103f3891122f0e6fe30ae1f829.tar.gz rneovim-7d67bd58655052103f3891122f0e6fe30ae1f829.tar.bz2 rneovim-7d67bd58655052103f3891122f0e6fe30ae1f829.zip |
Merge #15677 release-0.5: backports
Diffstat (limited to 'test/functional/lua/highlight_spec.lua')
-rw-r--r-- | test/functional/lua/highlight_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/lua/highlight_spec.lua b/test/functional/lua/highlight_spec.lua new file mode 100644 index 0000000000..50eecb5d09 --- /dev/null +++ b/test/functional/lua/highlight_spec.lua @@ -0,0 +1,25 @@ +local helpers = require('test.functional.helpers')(after_each) +local exec_lua = helpers.exec_lua +local eq = helpers.eq +local eval = helpers.eval +local command = helpers.command +local clear = helpers.clear + +describe('vim.highlight.on_yank', function() + + before_each(function() + clear() + end) + + it('does not show errors even if buffer is wiped before timeout', function() + command('new') + exec_lua[[ + vim.highlight.on_yank({timeout = 10, on_macro = true, event = {operator = "y", regtype = "v"}}) + vim.cmd('bwipeout!') + ]] + helpers.sleep(10) + helpers.feed('<cr>') -- avoid hang if error message exists + eq('', eval('v:errmsg')) + end) + +end) |