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
Justin M. Keyes
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
zeertzjq
55f6a1cab0
vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817)
Problem:    Incsearch not triggered when pasting clipboard register on the
            command line.
Solution:   Also set "literally" when using a clipboard register. (Ken Takata,
            closes vim/vim#12460)

9cf6ab1332

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-05-30 07:18:12 +08:00
Shougo
f195345c93
[RFC] fix: has('python') error (#17252)
* fix: has('python') error

* fix: functional tests
2022-01-31 15:06:46 +01:00
Justin M. Keyes
7e1c959861 test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
2019-09-06 17:19:07 -07:00
Justin M. Keyes
2141dc2262 provider: check #Call() if g:loaded_xx_provider=2 2019-08-04 13:23:46 +02:00
Justin M. Keyes
5e6a08f2e6 provider: skip non-provider has() feature-names
We don't want to retry autoload sourcing (slow) for every random has()
query that finds it way to eval_call_provider().
2019-08-04 13:23:46 +02:00
Justin M. Keyes
66938b928c provider: decide status by g:loaded_xx_provider 2019-08-04 13:23:46 +02:00
Rui Abreu Ferreira
2cfe4748e5 provider: let providers decide their status
Instead of deciding provider status in eval_has_provider, move the
decision to the provider Vim scripts.

Previously, provider loading worked as follows:

1. eval_has_provider() verified provider availability by searching for
   the provider#providername#Call function and cached this verificaion as a static
   variable for some providers
2. providers short-circuited on loading to prevent the definition of the
   Call function (with the exception of the node provider that did not)

This commit changes the expected interface between nvim and its
providers to facilitate provider reloading, by splitting the
verification of the provider from the availability of the Call function.

eval_has_provider() now checks for a provider#providername#enabled
variable. It is up to the provider script to set this to 0 or 1
accordingly. eval_call_provider() remains unchanged.

All providers hosting a Call function were updated to respect this.

The clipboard provider now has a Reload function to reload the
provider.
2019-08-04 13:23:46 +02:00