summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/core/exit_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-22feat(:restart): v:starttime, v:exitreason #39282Justin M. Keyes1
Problem: - The `ZR` feature makes it more obvious that we need some sort of flag so that an `ExitPre` / `QuitPre` / `VimLeave` handler can handle restarts differently than a normal exit. For example, it's common that users want `:mksession` on restart, but perhaps not on a normal exit. - Nvim has no way to report its "uptime". Solution: - Introduce `v:starttime` - Introduce `v:exitreason`
2026-04-04fix(channel): crash on exit after closing v:stderr channel (#38754)zeertzjq1
Problem: Crash on exit after closing v:stderr channel when piping to stdin. Solution: Reopen stderr as /dev/null or NUL instead of closing it. This also avoids writing to an related file if one is opened after closing v:stderr.
2026-01-20test: add tests for #14379zeertzjq1
2025-09-24test: remove a few more redundant clear() calls (#35903)zeertzjq1
2025-02-28vim-patch:8.2.4603: sourcing buffer lines is too complicatedzeertzjq1
Problem: Sourcing buffer lines is too complicated. Solution: Simplify the code. Make it possible to source Vim9 script lines. (Yegappan Lakshmanan, closes vim/vim#9974) https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194 This commit changes the behavior of sourcing buffer lines to always have a script ID, although sourcing the same buffer always produces the same script ID. vim-patch:9.1.0372: Calling CLEAR_FIELD() on the same struct twice Problem: Calling CLEAR_FIELD() on the same struct twice. Solution: Remove the second CLEAR_FIELD(). Move the assignment of cookie.sourceing_lnum (zeertzjq). closes: vim/vim#14627 https://github.com/vim/vim/commit/f68517c1671dfedcc1555da50bc0b3de6d2842f6 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-01-04test: use spawn_wait() instead of system() #31852Justin M. Keyes1
Problem: Tests that need to check `nvim` CLI behavior (no RPC session) create their own ad-hoc `system()` wrappers. Solution: - Use `n.spawn_wait` instead of `system()`. - Bonus: this also improves the tests by explicitly checking for `stdout` or `stderr`. And if a signal is raised, `ProcStream.status` will reflect it.
2024-04-23test: improve test conventionsdundargoc1
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-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-02-12refactor(tests): get channel id via nvim_get_chan_info #27441Justin M. Keyes1
Minor "best practices" nudge.
2024-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-12test: normalise nvim bridge functionsLewis Russell1
- remove helpers.cur*meths - remove helpers.nvim
2024-01-03refactor: format test/*Justin M. Keyes1
2023-03-25feat(api): nvim_exec2(), deprecate nvim_exec() #19032Evgeni Chasnovski1
Problem: The signature of nvim_exec() is not extensible per ":help api-contract". Solution: Introduce nvim_exec2() and deprecate nvim_exec().
2023-02-09test(exit_spec): make sure that autocommands are triggered (#22188)zeertzjq1
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-01-16refactor: remove E5500, adjust testszeertzjq1
Now with try_end() including more exception info, E5500 looks like redundant information. Adjust tests for more exception information.
2022-08-12test: make Ex mode exit test test what it wants to test (#19728)zeertzjq1
2022-08-07vim-patch:8.2.1281: the "trailing characters" error can be hard to understandzeertzjq1
Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message. https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
2021-09-19refactor(tests): remove redir_exec #15718Justin M. Keyes1
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-01refactor(tests): use assert_alive() #15546Justin M. Keyes1
2020-10-19A Mudholland Dr. RecastBjörn Linse1
The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
2018-03-24test: lua test for vim-patch:8.0.0184Nimit Bhardwaj1
https://github.com/vim/vim/commit/2b7bc567b9238aaac682236cb4f727d0376e1302
2017-10-22:cquit : take an error code argument #7336Josh Leeb-du Toit1
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
2016-12-01Tests: add tests for v:exitingMarco Hinz1