summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/vimscript/has_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-01-21test: fix has() test failure (#37480)Kevin Goodsell1
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
2025-12-01feat(version): support multiple Vim versionsJan Edmund Lazo1
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.
2025-11-22feat: has('terminfo')Justin M. Keyes1
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')`.
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
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.
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-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-12test: use vim.mpack and vim.uv directlyLewis Russell1
2024-01-03refactor: format test/*Justin M. Keyes1
2023-02-27feat(ui): restore has('gui_running')Justin M. Keyes1
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.
2022-11-22test: simplify platform detection (#21020)dundargoc1
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-04-26fix: has() should preserve v:shell_error #18280Andrey Mishchenko1
fixes #18278
2021-10-29fix(eval): fix has('wsl') #16153erw71
Problem: has('wsl') is decided at build-time. Solution: Check os_uname(). Fixes #12642, #16143
2021-09-17test: reorg #15698Justin M. Keyes1
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