aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/ui_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/ui_spec.lua')
-rw-r--r--test/functional/lua/ui_spec.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/lua/ui_spec.lua b/test/functional/lua/ui_spec.lua
index 04646c202e..6dd4bba060 100644
--- a/test/functional/lua/ui_spec.lua
+++ b/test/functional/lua/ui_spec.lua
@@ -174,6 +174,17 @@ describe('vim.ui', function()
)
end)
+ it('can reuse opt.cmd without accumulating paths', function()
+ eq(
+ 'arg1=arg1;arg2=https://example.com/second;',
+ exec_lua(function(opener)
+ local opts = { cmd = { opener, 'arg1' } }
+ vim.ui.open('https://example.com/first', opts):wait()
+ return vim.ui.open('https://example.com/second', opts):wait().stdout
+ end, n.testprg('printargs-test'))
+ )
+ end)
+
it('gx on a help tag opens URL', function()
n.command('helptags $VIMRUNTIME/doc')
n.command('help nvim.txt')