aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/has_spec.lua
Commit message (Collapse)AuthorAge
* test(version): adapt to vim-patch updatesJustin M. Keyes6 days
|
* docs: update version.cJan Edmund Lazo2026-09-23
| | | | Fix has_spec.lua for v9.1.0000
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* fix(test): only test for unibilium if a valid compilation string existsJames McCoy2026-06-04
| | | | | | | | | | Builds with -DNDEBUG do not contain the compilation string, so the test will fail even if nvim is built with unibilium. Similarly, zig builds only report "Compilation: TODO", so they also fail the test even when build with unibilium Detect both scenarios and skip the test, rather than failing it.
* test: fix has() test failure (#37480)Kevin Goodsell2026-01-21
| | | | | | | | | | | | | Problem: has("terminfo") test fails on local runs because it expects "HAVE_UNIBILIUM " in the :version info to mean that nvim was built without unibilium. Solution: Assume nvim is built with unibilium if HAVE_UNIBILIUM is present in the version string and is NOT followed by 0, false, or off. This isn't affecting CI runs because when the test detects that it is running in CI it doesn't use the :version string at all. Resolves https://github.com/neovim/neovim/issues/37456
* feat(version): support multiple Vim versionsJan Edmund Lazo2025-12-01
| | | | | | | | | | Group up to 15 vimpatch numbers in 1 line to guard against 'make formatc'. 1-liner for vim_versions, num_patches. Automate '*Version' to remove version.h macros. '-V1 -v' lists merged Vim versions.
* feat: has('terminfo')Justin M. Keyes2025-11-22
| | | | | | | | | Problem: No way to detect at runtime if the build includes unibilium (or whatever terminfo layer we swap it with later). Solution: Support `has('terminfo')`.
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
* 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: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: use vim.mpack and vim.uv directlyLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* feat(ui): restore has('gui_running')Justin M. Keyes2023-02-27
| | | | | | | | | | Problem: has('gui_running') is still common in the wild and our answer has changed over time, causing frustration. https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1 Solution: Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
* 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")`.
* fix: has() should preserve v:shell_error #18280Andrey Mishchenko2022-04-26
| | | fixes #18278
* fix(eval): fix has('wsl') #16153erw72021-10-29
| | | | | | | | Problem: has('wsl') is decided at build-time. Solution: Check os_uname(). Fixes #12642, #16143
* test: reorg #15698Justin M. Keyes2021-09-17
Problem: Subdirectories like "visual", "insert", "normal" encourage people to separate *related* tests for no good reason. Typically the _mode_ is not the relevant topic of a test (and when it is, _then_ create an appropriate describe() or it()). Solution: - Delete the various `test/functional/<mode>/` subdirectories, move their tests to more meaningful topics. - Rename `…/normal/` to `…/editor/`. - Move or merge `…/visual/*` and `…/insert/*` tests into here where appropriate. - Rename `…/eval/` to `…/vimscript/`. - Move `…/viml/*` into here also. * test(reorg): insert/* => editor/mode_insert_spec.lua * test(reorg): cmdline/* => editor/mode_cmdline_spec.lua * test(reorg): eval core tests => eval_spec.lua