Commit Graph

11 Commits

Author SHA1 Message Date
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
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
zeertzjq
f6042d5c30
test: add test for 'foldcolumn' with cmdwin (#27355) 2024-02-06 11:44:53 +08:00
Lewis Russell
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
Justin M. Keyes
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
Brandon Simmons
58f9486144
fix(folds): update folds in Insert mode with fdm=indent (#24402)
Previously, when using foldmethod=indent, inserting an unindented line
would inadvertently open closed folds below it.
As a performance improvement, folds were only updated once, across all
lines, after Insert mode was exited.

Now, the performance improvement is no longer being used when
foldmethod=indent, so folds are updated multiple times during Insert
mode, but only across the lines that are changing, which preserves the
folds (and their open/close states) instead of recreating them.
2023-07-21 08:56:08 +08:00
zeertzjq
d321deb4a9
test: fix dependencies between test cases (#23343)
Discovered using --shuffle argument of busted.
2023-04-27 15:51:44 +08:00
zeertzjq
73060f00dd
test: improve editor/fold_spec.lua and editor/put_spec.lua (#22916)
- Close and open a new window each time so that window options have
  their default values in each test.
- Change feed_command() to command() as the latter is faster.
2023-04-07 09:29:12 +08:00
Brandon Simmons
824639c7c1
fix(folds): handle visual blockwise indent insertion correctly (#22898)
Previously, the fold information was incorrect because it wasn't
being updated during the blockwise insertion.
(Solution by zeertzjq)
2023-04-07 00:08:46 +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