Commit Graph

19 Commits

Author SHA1 Message Date
bfredl
e61228a214 fix(tests): needing two calls to setup a screen is cringe
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-11-14 12:40:57 +01:00
bfredl
ef4c9b136e refactor(tests): again yet more global highlight definitions 2024-08-14 14:03:34 +02:00
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
Justin M. Keyes
0185152802
refactor(tests): get channel id via nvim_get_chan_info #27441
Minor "best practices" nudge.
2024-02-12 05:50:39 -08:00
Lewis Russell
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +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
1037ce2e46 test: avoid repeated screen lines in expected states
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
2023-12-09 22:15:02 +08:00
zeertzjq
61d5bd561a refactor: remove E5500, adjust tests
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
2023-01-16 18:03:08 +08:00
zeertzjq
3dadd3aca5
vim-patch:8.2.2870: CmdlineChange event triggered twice for CTRL-R (#21361)
Problem:    CmdlineChange event triggered twice for CTRL-R.
Solution:   Return CMDLINE_NOT_CHANGED from cmdline_insert_reg().
            (closes vim/vim#8219)

796139ae3a

Cherry-pick Test_cmdline_map_cmdlineChanged() from patch 8.2.2851.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-11 08:48:00 +08:00
zeertzjq
ad244a865b
fix(events): save v:event for cmdline autocommands separately (#21316) 2022-12-07 08:57:29 +08:00
Brian Wignall
001e69cd46 doc: fix typos
close #11459
2019-11-27 22:47:25 -08:00
Björn Linse
5f82889be7 cmdline: support v:event in CmdlineChanged 2018-12-12 15:31:52 +01:00
Björn Linse
98e7112390 msg: do not scroll entire screen (#8088) 2018-03-31 11:12:27 +02:00
Justin M. Keyes
fd4021387e test: rename next_message() to next_msg() 2018-03-11 12:43:42 +01:00
Björn Linse
d9b3ebfede FIXUP: duplicate error number in #7422 2017-11-23 07:36:35 +01:00
Björn Linse
a4f6cec7a3
cmdline: CmdlineEnter and CmdlineLeave autocommands (#7422)
vim-patch:fafcf0dd59fd

patch 8.0.1206: no autocmd for entering or leaving the command line

Problem:    No autocmd for entering or leaving the command line.
Solution:   Add CmdlineEnter and CmdlineLeave.

fafcf0dd59
2017-11-22 22:35:20 +01:00