Commit Graph

26 Commits

Author SHA1 Message Date
7035125b2b test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
2024-04-08 22:51:00 +02:00
35239e977f test: use matches(...) instead of ok(string.find(...)) (#28111) 2024-03-30 09:29:21 +08:00
a25aeee856 test(core/channel_spec): fix lint failure 2024-01-22 08:15:13 +08:00
18d62d129f test(core/channels_spec): fix variable name 2024-01-22 08:02:21 +08:00
4d4092ac9e fix(rpc): assertion failure due to invalid msgpack input
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
2024-01-21 23:42:58 +00:00
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
c30f2e3182 test: typing for helpers.meths 2024-01-12 13:01:06 +00:00
7a259d01ae test: remove helpers.sleep() 2024-01-12 12:04:19 +00:00
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
3e8955094a test: re-bundle cat on windows (#21255)
The builtin cat was removed in 4bc9229ecb
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.
2023-03-14 09:12:26 +08:00
5eb5f49488 test: simplify platform detection (#21020)
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")`.
2022-11-22 08:13:30 +08:00
736c36c02f test: introduce skip() #21010
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())`.
2022-11-13 05:52:19 -08:00
5051510ade fix(channel): fix channel consistency
- 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.
2022-03-12 19:23:45 +08:00
a4069a3eed feat(--headless): add on_print callback to stdioopen
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).
2022-01-24 13:59:16 +01:00
73d12a8b71 test: fix running functional tests under gdbserver
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>
2021-09-20 18:10:40 +05:30
7e9ea08321 feat(f_chansend): support Blob data argument 2021-09-16 00:14:47 +01:00
540360a775 test: is_os() #10933
- Move os_name() up to "global helpers".
- Rename it to is_os().
- Make it depend on uname() instead of a running Nvim instance.
2019-09-04 06:58:04 -07:00
ead39d6ce6 test/uname(): always lowercase 2019-09-01 22:49:33 -07:00
b64af88c84 CI/OpenBSD: run functional tests
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
2019-09-01 22:49:33 -07:00
fd04877eb0 test: remove use of require('test.helpers')
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').
2019-05-18 15:48:13 +02:00
24f9dd73d5 test/channels_spec: cleanup
- Remove stray print()
- Use uname() instead of system('uname')
2019-05-12 00:43:28 +02:00
8e44396794 functionaltest: enable buffered output tests 2018-10-31 22:55:07 -04:00
fd4021387e test: rename next_message() to next_msg() 2018-03-11 12:43:42 +01:00
308dd53783 channel: check for existance before trying to set key
This avoids an error message in async context, where it is not safe.
2017-12-23 14:02:00 +01:00
e3c4c8a90e tests: mark flaky socket test pending for now 2017-11-27 11:43:24 +01:00
91b856ccce channels: tests 2017-11-26 09:17:04 +01:00