From 5792546777332361a9ac49107e46149c703de90e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 15 Sep 2024 03:28:14 -0700 Subject: refactor(tests): rename terminal/testutil.lua => testterm.lua #30372 This module is generally used by any tests that need the full Nvim TUI instead of `screen.lua`. Thus it should live in `functional/` instead of in `functional/terminal/`. --- test/client/session.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'test/client') diff --git a/test/client/session.lua b/test/client/session.lua index cf3d8c4f25..38d81eff83 100644 --- a/test/client/session.lua +++ b/test/client/session.lua @@ -114,6 +114,7 @@ function Session:request(method, ...) return true, result end +--- Runs the event loop. function Session:run(request_cb, notification_cb, setup_cb, timeout) local function on_request(method, args, response) coroutine_exec(request_cb, method, args, function(status, result, flag) -- cgit From ff85e54939b0aca34a779a2b6381d09db1858b29 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 18 Sep 2024 04:14:06 -0700 Subject: feat(tui): builtin UI (TUI) sets client info #30397 Problem: The default builtin UI client does not declare its client info. This reduces discoverability and makes it difficult for plugins to identify the UI. Solution: - Call nvim_set_client_info after attaching, as recommended by `:help dev-ui`. - Also set the "pid" field. - Also change `ui_active()` to return a count. Not directly relevant to this commit, but will be useful later. --- test/client/session.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/client') diff --git a/test/client/session.lua b/test/client/session.lua index 38d81eff83..bfce4eedc7 100644 --- a/test/client/session.lua +++ b/test/client/session.lua @@ -96,8 +96,7 @@ end --- @param method string --- @param ... any ---- @return boolean ---- @return table +--- @return boolean, table function Session:request(method, ...) local args = { ... } local err, result -- cgit From e5c174421df3872df0dd3a676609d1e74dfef6a9 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 11 Aug 2024 09:27:48 +0100 Subject: test: support upvalues in exec_lua --- test/client/session.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'test/client') diff --git a/test/client/session.lua b/test/client/session.lua index bfce4eedc7..f1f46c5efe 100644 --- a/test/client/session.lua +++ b/test/client/session.lua @@ -7,6 +7,7 @@ local MsgpackRpcStream = require('test.client.msgpack_rpc_stream') --- @field private _prepare uv.uv_prepare_t --- @field private _timer uv.uv_timer_t --- @field private _is_running boolean +--- @field exec_lua_setup boolean local Session = {} Session.__index = Session if package.loaded['jit'] then -- cgit