aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/normal_spec.lua
Commit message (Collapse)AuthorAge
* fix(ruler)!: consistent width in last line and statuslineSébastien Hoffmann2026-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Traditionally, the ruler in the last line is one cell shorter than in the statusline, leaving the last cell of the screen blank. According to code comments, this is in order to prevent unwanted scrolling on "some" (unspecified, but presumably ancient) terminals. Berkeley vi is more specific in its `vs_modeline` function: dumb terminals with hardware scroll, SunOS 4.1.1 and Ultrix 4.2 curses. (n)curses still has a similar limitation in `(w)addstr`, but apparently only for historical reasons. Maintaining the different widths leads to awkward inconsistencies when the ruler is configured with 'rulerformat', except for the special case where it contains a top-level `%=`. Shifting the ruler in the last line to the left would be a solution, but the empty cell at the end doesn't seem to be relevant anymore. Solution: extend the ruler in the last line all the way to the right edge of the screen, just like in the statusline. The exact same amount of place will be available to the rest of the UI as before. BREAKING CHANGE: - the default ruler width is now 18 cells - the last cell of the screen is no longer empty Closes #41076
* 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`.
* test: mark non-actionable tests as N/A #40207Justin M. Keyes2026-06-12
| | | | | | | | | | Problem: Listing individual "skipped" notices for each non-actionable or NVIM_TEST_INTEG test is noisy and makes the "skipped" list overwhelming and less meaningful. Solution: - Mark non-actionable tests with "N/A". - Report NVIM_TEST_INTEG tests as a separate 1-line summary.
* vim-patch:9.2.0120: tests: test_normal failszeertzjq2026-03-09
| | | | | | | | | | | | Problem: tests: test_normal fails Solution: Ensure the terminal width is 40 columns and also check for existence of the tr.mo file closes: vim/vim#19608 https://github.com/vim/vim/commit/123a1e64106ea74a50d9428b465a604cae4c104f Co-authored-by: Christian Brabandt <cb@256bit.org>
* test: support running functionaltests in parallel by directory (#37918)zeertzjq2026-02-18
| | | | | | | | | Define a CMake target for every subdirectory of test/functional that contains functional tests, and a functionaltest_parallel target that depends on all those targets, allowing multiple test runners to run in parallel. On CI, use at most 2 parallel test runners, as using more may increase system load and make tests unstable.
* vim-patch:9.1.1479: regression when displaying localized percentage positionzeertzjq2025-10-31
| | | | | | | | | | | | | | | | | | | | | Problem: regression when displaying localized percentage position (after v9.1.1291) Solution: calculate percentage first (Emir SARI) Cleanups made in ec032de broke the Turkish percent display, failing to prepend it properly in cases between 0 and 10. In Turkish, the percent sign is prepended to the number, so it was displaying it as `% 5` (should have been `%5`), while displaying numbers bigger than 9 properly. related: vim/vim#17597 https://github.com/vim/vim/commit/8fe9e55a7d92870f5bbaa592e1f3617e9cda33c6 The test was unskipped in Vim in patch 9.1.1479 which added Turkish translation for "%d%%". However, Nvim has had Turkish translation for "%d%%" since 2023, so don't skip the test. Co-authored-by: Emir SARI <emir_sari@icloud.com>
* vim-patch:9.1.0869: Problem: curswant not set on gm in folded line (#31247)zeertzjq2024-11-18
| | | | | | | | | | | | | Problem: curswant not set on gm in folded line (citizenmatt) Solution: in a folded line, call update_curswant_force() fixes: vim/vim#11596 closes: vim/vim#11994 closes: vim/vim#15398 https://github.com/vim/vim/commit/9848face747ba91282d34a96dcb966bcb410bf2b Co-authored-by: Christian Brabandt <cb@256bit.org>
* 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
|
* vim-patch:9.1.0260: Problems with "zb" and scrolling to new topline with ↵Luuk van Baal2024-04-08
| | | | | | | | | | | | | | 'smoothscroll' Problem: "zb" does not reveal filler lines at the start of a buffer. Scrolled cursor position with 'smoothscroll' is unpredictable, and may reset skipcol later if it is not visible (after v9.1.258) Solution: Replace confusing for loop that reaches final control value too early with while loop. Set "w_curswant" accordingly so cursor will be placed in visible part of topline. (Luuk van Baal) https://github.com/vim/vim/commit/bd28cae1f1c21c0e3743e3427c98bbd848fad237
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test(normal): port legacy normal test for page scrolling (#28100)luukvbaal2024-03-29
|
* refactor(tests): use global defaults instead of set_default_attr_ids (2)bfredl2024-03-27
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
* vim-patch:9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff"Luuk van Baal2023-05-09
Problem: Cursor moves to wrong line when 'foldmethod' is "diff". (Rick Howe) Solution: Adjust logic for scrolling. (Luuk van Baal, closes vim/vim#12364, closes vim/vim#12218) https://github.com/vim/vim/commit/aa6ba308a1498dc8da04d1d30ec0470018bf782a