aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor/langmap_spec.lua
Commit message (Collapse)AuthorAge
* 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(mappings): 'langmap' with multibyte chars #40148Vahur Sinijärv2026-06-15
| | | | | | | | | | | | | | | | | | | Problem: On some non-US keyboards, like Estonian/Swedish/etc, widely used [] characters in vim are hard to type. One way to overcome this is to use langmap option to map accented characters, that are in the same place as [] on US keyboards to []. Unfortunately this does not work currently in neovim, it cannot map multibyte characters via langmap. Solution: The fix iterates over characters in typeahead and key buffers, instead of bytes, in getchar.c handle_mapping(). It does not handle macros though, these tests are still failing when turned on. Closes #2420 Closes #27776 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* test(buffer_updates_spec): move on_detach tests to its block (#37297)zeertzjq2026-01-08
|
* fix(langmap): assert failure on mapping to char >= 256 (#37291)zeertzjq2026-01-08
| | | | | | | Usually 'langmap' is used to map keyboard characters to ASCII motions or mappings. It's not entirely clear what the purpose of mapping to Unicode characters is, but since there is no error for mapping between two chars both >= 256, only give a warning that this will not work properly when mapping from a char < 256 to a char >= 256.
* 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: normalise nvim bridge functionsLewis Russell2024-01-12
| | | | | - remove helpers.cur*meths - remove helpers.nvim
* refactor: format test/*Justin M. Keyes2024-01-03
|
* vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nicezeertzjq2022-04-29
| | | | | | | | | Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
* test: correct order of arguments to eq() and neq()zeertzjq2022-04-26
|
* 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