aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/channels_spec.lua
Commit message (Collapse)AuthorAge
* refactor(tests): merge n.spawn/n.spawn_argv into n.new_session #31859Justin M. Keyes2025-01-04
| | | | | | | | | | | | | | | | | Problem: - `n.spawn()` is misleading because it also connects RPC, it's not just "spawning" a process. - It's confusing that `n.spawn()` and `n.spawn_argv()` are separate. Solution: - Replace `n.spawn()`/`n.spawn_argv()` with a single function `n.new_session()`. This name aligns with the existing functions `n.set_session`/`n.get_session`. - Note: removes direct handling of `prepend_argv`, but I doubt that was important or intentional. If callers want to control use of `prepend_argv` then we should add a new flag to `test.session.Opts`. - Move `keep` to first parameter of `n.new_session()`. - Add a `merge` flag to `test.session.Opts` - Mark `_new_argv()` as private. Test should use clear/new_session/spawn_wait instead.
* fix(channel): handle writing to file instead of pipe (#30519)zeertzjq2024-09-26
|
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test: use matches(...) instead of ok(string.find(...)) (#28111)zeertzjq2024-03-30
|
* test(core/channel_spec): fix lint failurezeertzjq2024-01-22
|
* test(core/channels_spec): fix variable namezeertzjq2024-01-22
|
* fix(rpc): assertion failure due to invalid msgpack inputnwounkn2024-01-21
| | | | | | | | | Problem: rbuffer_consumed assertion fails if Unpacker fails to parse msgpack, because it doesn't consume bytes on errors Solution: Call rbuffer_consumed_compact only if Unpacker isn't closed
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: remove helpers.sleep()Lewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: re-bundle cat on windows (#21255)dundargoc2023-03-14
| | | | | | | | | | The builtin cat was removed in 4bc9229ecbec514e9a87cfc4be88ea27a971e9a1 as it is not used during runtime but only for tests. However, it is a very small and useful utility program that we need for a lot of our tests, so there's no harm in bundling it, and it helps us avoid complicating our build system by having two versions of neovim (neovim for users and neovim for testing). Also skip tests if "grep" or "sleep" isn't available.
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* fix(channel): fix channel consistencyerw72022-03-12
| | | | | | | - Fix the problem that chanclose() does not work for channel created by nvim_open_term(). - Fix the problem that the loopback channel is not released. - Fix the error message when sending raw data to the loopback channel.
* feat(--headless): add on_print callback to stdioopenglacambre2022-01-24
| | | | | | | This commit adds an on_print callback to stdioopen's dictionary argument which lets the caller specify a function called each time neovim will try to output something to stdout (e.g. on "echo" or "echoerr" in --headless mode).
* test: fix running functional tests under gdbserverShreyansh Chouhan2021-09-20
| | | | | | | | | | | It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
* feat(f_chansend): support Blob data argumentSean Dewar2021-09-16
|
* test: is_os() #10933Justin M. Keyes2019-09-04
| | | | | - Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
* test/uname(): always lowercaseJustin M. Keyes2019-09-01
|
* CI/OpenBSD: run functional testsEdd Barrett2019-09-01
| | | | | | | | | | | Adapt some tests for OpenBSD: - scrollback_spec: - seq(1) is not available on OpenBSD: we'd use jot(1). - Instead use a (hopefully) portable awk(1) snippet. - channels_spec - job_spec - tui_spec
* test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* test/channels_spec: cleanupJustin M. Keyes2019-05-12
| | | | | - Remove stray print() - Use uname() instead of system('uname')
* functionaltest: enable buffered output testsJan Edmund Lazo2018-10-31
|
* test: rename next_message() to next_msg()Justin M. Keyes2018-03-11
|
* channel: check for existance before trying to set keyBjörn Linse2017-12-23
| | | | This avoids an error message in async context, where it is not safe.
* tests: mark flaky socket test pending for nowBjörn Linse2017-11-27
|
* channels: testsBjörn Linse2017-11-26