From ede4eac61f48bb685ab420830481393711d9f0d3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 2 Mar 2022 22:30:35 +0800 Subject: test: mention poke_eventloop() instead of wait() --- test/functional/terminal/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index d909888613..c5315d0185 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -94,7 +94,7 @@ local function screen_setup(extra_rows, command, cols, opts) table.insert(expected, '{3:-- TERMINAL --}' .. ((' '):rep(cols - 14))) screen:expect(table.concat(expected, '|\n')..'|') else - -- This eval also acts as a wait(). + -- This eval also acts as a poke_eventloop(). if 0 == nvim('eval', "exists('b:terminal_job_id')") then error("terminal job failed to start") end -- cgit From a2f157233f274599739941e39673ca4d3b0291c3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 11 Apr 2022 10:23:33 +0800 Subject: fix(tui)!: remove `ESC NUL` forced escape (#17198) This make Nvim recognize `ESC NUL` as , as many terminal emulators (including libvterm) send as `ESC NUL`. There is already another unambiguous way to encode a `ESC` key supported by libtermkey: `ESC [ 2 7 u`, which is a `CSI u` sequence. If one still wants to use `ESC NUL` as `ESC`, they can just map to . --- test/functional/terminal/helpers.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index c5315d0185..51ecae663a 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -7,7 +7,9 @@ local nvim_dir = helpers.nvim_dir local feed_command, nvim = helpers.feed_command, helpers.nvim local function feed_data(data) - nvim('set_var', 'term_data', data) + -- A string containing NUL bytes is not converted to a Blob when + -- calling nvim_set_var() API, so convert it using Lua instead. + nvim('exec_lua', 'vim.g.term_data = ...', {data}) nvim('command', 'call jobsend(b:terminal_job_id, term_data)') end -- cgit From f977f9445f7689fc32a136108ff92b3c2137968c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 22 Jun 2022 05:51:52 -0700 Subject: refactor(tests): introduce testprg() Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell. --- test/functional/terminal/helpers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index 51ecae663a..bcfd3559e6 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -3,7 +3,7 @@ -- operate on the _host_ session, _not_ the child session. local helpers = require('test.functional.helpers')(nil) local Screen = require('test.functional.ui.screen') -local nvim_dir = helpers.nvim_dir +local testprg = helpers.testprg local feed_command, nvim = helpers.feed_command, helpers.nvim local function feed_data(data) @@ -37,7 +37,7 @@ local function clear_attrs() feed_termcode('[0;10m') end local function enable_mouse() feed_termcode('[?1002h') end local function disable_mouse() feed_termcode('[?1002l') end -local default_command = '["'..nvim_dir..'/tty-test'..'"]' +local default_command = '["'..testprg('tty-test')..'"]' local function screen_setup(extra_rows, command, cols, opts) extra_rows = extra_rows and extra_rows or 0 -- cgit