dundargoc
052498ed42
test: improve test conventions
...
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-23 18:17:04 +02:00
zeertzjq
7fa24948a9
test: make mapping tests more consistent ( #28368 )
...
- Test maparg() and maplist() in the same test.
- Use matches() instead of string.match().
- Avoid overlong lines and strange spacing in exec_lua().
- Revert code change from last PR as the variable may be needed.
2024-04-16 14:05:09 +08:00
Lewis Russell
81fc27124b
refactor(test): inject after_each differently
2024-04-10 15:53:50 +01:00
dundargoc
7035125b2b
test: improve test conventions
...
Work on https://github.com/neovim/neovim/issues/27004 .
2024-04-08 22:51:00 +02:00
Lewis Russell
795f896a57
test: rename (meths, funcs) -> (api, fn)
2024-01-12 18:59:14 +00:00
Lewis Russell
4f81f506f9
test: normalise nvim bridge functions
...
- remove helpers.cur*meths
- remove helpers.nvim
2024-01-12 17:53:27 +00:00
Lewis Russell
c30f2e3182
test: typing for helpers.meths
2024-01-12 13:01:06 +00:00
Justin M. Keyes
04f2f864e2
refactor: format test/*
2024-01-03 02:09:29 +01:00
zeertzjq
3c667d3e0f
fix(mappings): fix mapset() not replacing map with backslash ( #26719 )
2023-12-23 15:30:44 +08:00
zeertzjq and Ernie Rael
04d299c170
vim-patch:8.2.4932: not easy to filter the output of maplist()
...
Problem: Not easy to filter the output of maplist().
Solution: Add mode_bits to the dictionary. (Ernie Rael, closes vim/vim#10356 )
https://github.com/vim/vim/commit/d8f5f766219273a8579947cc80b92580b6988a4b
Co-authored-by: Ernie Rael <errael@raelity.com >
2023-11-09 21:34:04 +08:00
zeertzjq and Ernie Rael
f748a73a35
vim-patch:8.2.4861: it is not easy to restore saved mappings
...
Problem: It is not easy to restore saved mappings.
Solution: Make mapset() accept a dict argument. (Ernie Rael, closes vim/vim#10295 )
https://github.com/vim/vim/commit/51d04d16f21e19d6eded98f9530d84089102f925
Co-authored-by: Ernie Rael <errael@raelity.com >
2023-11-09 21:34:04 +08:00
zeertzjq and Bram Moolenaar
a4b80c71ea
vim-patch:8.2.4140: maparg() does not indicate the type of script
...
Problem: maparg() does not indicate the type of script where it was defined.
Solution: Add "scriptversion".
https://github.com/vim/vim/commit/a9528b39a666dbaa026320f73bae4b1628a7fe51
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-11-09 21:34:02 +08:00
zeertzjq and Bram Moolenaar
88cfb49bee
vim-patch:8.2.4890: inconsistent capitalization in error messages
...
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-05-05 09:20:30 +08:00
Lewis Russell
e8cc489acc
feat(test): add Lua forms for API methods ( #20152 )
2022-11-14 10:01:35 +00:00
c815aadfcc
docs: fix typos ( #20150 )
...
Co-authored-by: Miguel Carneiro <mcarneiromorenas@gmail.com >
Co-authored-by: Gregory Anders <greg@gpanders.com >
Co-authored-by: Raphael <glephunter@gmail.com >
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-09-26 17:43:23 +08:00
zeertzjq
291a649632
fix(mapset): remove existing abbreviation of same lhs ( #20320 )
2022-09-24 21:07:18 +08:00
zeertzjq
0c6b39894f
feat(mapset): support restoring Lua callback ( #20024 )
...
vim-patch:9.0.0341: mapset() does not restore <Nop> mapping properly
Problem: mapset() does not restore <Nop> mapping properly.
Solution: Use an empty string for <Nop>. (closes vim/vim#11022 )
https://github.com/vim/vim/commit/92a3d20682d46359bb50a452b4f831659e799155
2022-09-01 06:19:49 +08:00
zeertzjq
d954e8da62
feat(mapset): support restoring "replace_keycodes" and "desc"
2022-08-01 21:54:18 +08:00
zeertzjq
6963c2bdcd
vim-patch:8.2.0815: maparg() does not provide enough information for mapset()
...
Problem: maparg() does not provide enough information for mapset().
Solution: Add "lhsraw" and "lhsrawalt" items. Drop "simplified"
https://github.com/vim/vim/commit/9c65253fe702ea010afec11aa971acd542c35de2
vim-patch:9.0.0127: unused variable
Problem: Unused variable.
Solution: Remove the variable. (closes vim/vim#10829 )
https://github.com/vim/vim/commit/e95f22f63a1871b91e5508088e5ae4905ce28cd7
2022-08-01 21:54:18 +08:00
Justin M. Keyes
d8de4eb685
test: reorg #15698
...
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
2021-09-17 09:16:40 -07:00