diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-08 13:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 13:26:37 +0200 |
commit | cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0 (patch) | |
tree | 59bd8e97d87fa5da7cc95f290f47b93eaf8dd953 /test | |
parent | 6a8b48e24cbe070846dd1d234553b3fdeb19460e (diff) | |
parent | 5970157e1d22fd5e05ae5d3bd949f807fb7a744c (diff) | |
download | rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.gz rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.bz2 rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.zip |
Merge pull request #24985 from bfredl/hash2
refactor(map): enhanced implementation, Clean Codeā¢, etc etc
Diffstat (limited to 'test')
-rw-r--r-- | test/client/session.lua | 6 | ||||
-rw-r--r-- | test/functional/helpers.lua | 7 | ||||
-rw-r--r-- | test/unit/helpers.lua | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/test/client/session.lua b/test/client/session.lua index 0509fa88be..b1bf5ea75e 100644 --- a/test/client/session.lua +++ b/test/client/session.lua @@ -73,6 +73,11 @@ function Session:next_message(timeout) return table.remove(self._pending_messages, 1) end + -- if closed, only return pending messages + if self.closed then + return nil + end + self:_run(on_request, on_notification, timeout) return table.remove(self._pending_messages, 1) end @@ -139,6 +144,7 @@ function Session:close(signal) if not self._timer:is_closing() then self._timer:close() end if not self._prepare:is_closing() then self._prepare:close() end self._msgpack_rpc_stream:close(signal) + self.closed = true end function Session:_yielding_request(method, args) diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 67275b12a4..b98cf97e7e 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -83,6 +83,13 @@ end local session, loop_running, last_error, method_error +if not is_os('win') then + local sigpipe_handler = luv.new_signal() + luv.signal_start(sigpipe_handler, "sigpipe", function() + print("warning: got SIGPIPE signal. Likely related to a crash in nvim") + end) +end + function module.get_session() return session end diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 52769cd9e9..e9b97266d0 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -139,6 +139,7 @@ local function filter_complex_blocks(body) or string.find(line, "_Float") or string.find(line, "msgpack_zone_push_finalizer") or string.find(line, "msgpack_unpacker_reserve_buffer") + or string.find(line, "value_init_") or string.find(line, "UUID_NULL") -- static const uuid_t UUID_NULL = {...} or string.find(line, "inline _Bool")) then result[#result + 1] = line |