dundargoc
052498ed42
test: improve test conventions
...
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 .
2024-04-23 18:17:04 +02:00
Lewis Russell
81fc27124b
refactor(test): inject after_each differently
2024-04-10 15:53:50 +01:00
dundargoc
7035125b2b
test: improve test conventions
...
Work on https://github.com/neovim/neovim/issues/27004 .
2024-04-08 22:51:00 +02:00
Justin M. Keyes
0185152802
refactor(tests): get channel id via nvim_get_chan_info #27441
...
Minor "best practices" nudge.
2024-02-12 05:50:39 -08:00
Lewis Russell
795f896a57
test: rename (meths, funcs) -> (api, fn)
2024-01-12 18:59:14 +00:00
Lewis Russell
4f81f506f9
test: normalise nvim bridge functions
...
- remove helpers.cur*meths
- remove helpers.nvim
2024-01-12 17:53:27 +00:00
Justin M. Keyes
04f2f864e2
refactor: format test/*
2024-01-03 02:09:29 +01:00
Evgeni Chasnovski
fe9cbcb3a5
feat(api): nvim_exec2(), deprecate nvim_exec() #19032
...
Problem:
The signature of nvim_exec() is not extensible per ":help api-contract".
Solution:
Introduce nvim_exec2() and deprecate nvim_exec().
2023-03-25 09:58:48 -07:00
zeertzjq
1b379ce430
test(exit_spec): make sure that autocommands are triggered ( #22188 )
...
Previously, if the autocommands are not triggered, the tests may still
pass because no assertion is done. Add an assertion so that the tests
will fail if the autocommands aren't triggered.
2023-02-09 19:48:17 +08:00
zeertzjq
61d5bd561a
refactor: remove E5500, adjust tests
...
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
2023-01-16 18:03:08 +08:00
zeertzjq
0d9e09bf67
test: make Ex mode exit test test what it wants to test ( #19728 )
2022-08-12 09:04:08 +08:00
zeertzjq
48051ed62c
vim-patch:8.2.1281: the "trailing characters" error can be hard to understand
...
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
2d06bfde29
2022-08-07 14:39:19 +08:00
Justin M. Keyes
2afbce7651
refactor(tests): remove redir_exec #15718
...
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
because people copy existing tests.
- Disadvantages of `redir_exec`:
- Captures extra junk before the actual error/message that we _want_ to test.
- Does not fail on error, unlike e.g. `command()`.
Solution
- Use new functions like `nvim_exec` and `pcall_err`.
2021-09-19 02:29:37 -07:00
Justin M. Keyes
6751d6254b
refactor(tests): use assert_alive() #15546
2021-09-01 09:42:53 -07:00
Björn Linse
07cc231142
A Mudholland Dr. Recast
...
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
2020-10-19 21:48:06 +02:00
Nimit Bhardwaj
8d64a2fb1d
test: lua test for vim-patch:8.0.0184
...
2b7bc567b9
2018-03-24 23:06:09 +01:00
Josh Leeb-du Toit
9db42d4ce9
:cquit : take an error code argument #7336
...
closes #2699
ex_cmds.lua: use flags consistent with similar commands such as `cnext`.
upstream discussion:
"[patch] :qcuit can take exit code"
https://groups.google.com/d/msg/vim_dev/_PjyNbUKyRc/oPgr5_ZXc6AJ
2017-10-22 13:02:31 +02:00
Marco Hinz
df2ffe48ce
Tests: add tests for v:exiting
2016-12-01 14:57:27 +01:00