aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/buffer_spec.lua
diff options
context:
space:
mode:
authorTill Bungert <tillbungert@gmail.com>2025-02-13 15:24:01 +0100
committerGitHub <noreply@github.com>2025-02-13 08:24:01 -0600
commit93480f7fbaa5b4e5418d95dd35005daa6142dbb9 (patch)
treec9e5660e83172c13dca7f00b2669581d9d7811b5 /test/functional/terminal/buffer_spec.lua
parente4c6e732fd042e879f1f2b6bbef169e5dfbbde8a (diff)
downloadrneovim-93480f7fbaa5b4e5418d95dd35005daa6142dbb9.tar.gz
rneovim-93480f7fbaa5b4e5418d95dd35005daa6142dbb9.tar.bz2
rneovim-93480f7fbaa5b4e5418d95dd35005daa6142dbb9.zip
feat(term): trigger TermRequest for APC (#32407)
Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r--test/functional/terminal/buffer_spec.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 4635259e33..f2d679bd5d 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -350,6 +350,17 @@ describe(':terminal buffer', function()
eq(termbuf, eval('g:termbuf'))
end)
+ it('emits TermRequest events for APC', function()
+ local term = api.nvim_open_term(0, {})
+
+ -- cwd will be inserted in a file URI, which cannot contain backs
+ local cwd = t.fix_slashes(fn.getcwd())
+ local parent = cwd:match('^(.+/)')
+ local expected = '\027_Gfile://host' .. parent
+ api.nvim_chan_send(term, string.format('%s\027\\', expected))
+ eq(expected, eval('v:termrequest'))
+ end)
+
it('TermRequest synchronization #27572', function()
command('autocmd! nvim.terminal TermRequest')
local term = exec_lua([[