aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider
Commit message (Collapse)AuthorAge
* docs: misc (#31138)dundargoc2024-11-21
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | 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.
* refactor(tests): again yet more global highlight definitionsbfredl2024-08-14
|
* 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.
* test: remove unnecessary nil argument to testutil (#28270)zeertzjq2024-04-11
|
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* fix(eval): make has('pythonx') work properly (#27739)zeertzjq2024-03-05
| | | | Problem: has('pythonx') always returns 1. Solution: Make it the same as has('python3').
* refactor(tests): get channel id via nvim_get_chan_info #27441Justin M. Keyes2024-02-12
| | | Minor "best practices" nudge.
* refactor: rewrite python provider in luadundargoc2024-01-22
|
* 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
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: do not inject vim module into global helpersLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* fix(clipboard): make getreg() accurate for clipboard registers (#26740)JD2023-12-28
| | | | Problem: getreg("*") / getreg("+") disagree with :registers. Solution: Avoid falling back to unnamed register if provider fails.
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | 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
* fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes2023-06-22
| | | | followup to #24109 fix #16150
* vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register ↵zeertzjq2023-05-30
| | | | | | | | | | | | (#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) https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38 Co-authored-by: K.Takata <kentkt@csc.jp>
* test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque2023-05-22
| | | | `nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* test: re-bundle cat on windows (#21255)dundargoc2023-03-14
| | | | | | | | | | The builtin cat was removed in 4bc9229ecbec514e9a87cfc4be88ea27a971e9a1 as it is not used during runtime but only for tests. However, it is a very small and useful utility program that we need for a lot of our tests, so there's no harm in bundling it, and it helps us avoid complicating our build system by having two versions of neovim (neovim for users and neovim for testing). Also skip tests if "grep" or "sleep" isn't available.
* fix(clipboard): show provider warning when not during batch changes #21451zeertzjq2023-01-03
| | | | It is strange that Ex commands that explicitly interact with the clipboard show provider warning, but Normal mode commands do not.
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(tests): remove irrelevant usage of display-=msgsepbfredl2022-08-17
| | | | | | | | These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
* feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009Justin M. Keyes2022-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------------------------------------------------------------------------ $NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the current process should listen on this address") and a descriptor ("the current process is a child of this address"). This contradiction means the presence of NVIM_LISTEN_ADDRESS is ambiguous, so child Nvim always tries to listen on its _parent's_ socket. This is the cause of lots of "Failed to start server" spam in our test/CI logs: WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0 WARN 2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0 SOLUTION ------------------------------------------------------------------------ 1. Set $NVIM to the parent v:servername, *only* in child processes. - Now the correct way to detect a "parent" Nvim is to check for $NVIM. 2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes. 3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after server init. 4. Open a channel to parent automatically, expose it as v:parent. Fixes #3118 Fixes #6764 Fixes #9336 Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696 Ref #8696
* test(python3_spec): use a pattern to match SyntaxError message (#17705)zeertzjq2022-03-13
|
* vim-patch:8.1.0999: use register one too often and not properly testedzeertzjq2022-03-09
| | | | | | | Problem: Use register one too often and not properly tested. Solution: Do not always use register one when specifying a register. (closes vim/vim#4085) Add more tests. https://github.com/vim/vim/commit/9d7fdd403a3a9ee0d008b6dcbcd2ecc9ec0f57b7
* [RFC] fix: has('python') error (#17252)Shougo2022-01-31
| | | | | * fix: has('python') error * fix: functional tests
* feat(provider)!: remove support for python2 and python3.[3-5]Björn Linse2022-01-29
| | | | | | These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* fix(eval): cherry-pick emsg changes from v8.1.0736Sean Dewar2021-08-12
| | | | | | | | | | | v8.1.0736 made some changes for making some emsgs more specific. Includes the change for Test_lambda_fails() in test_lambda.vim. Adjust relevant functionaltests to expect the new emsgs. This patch has been fully ported in my Blob port PR, but it hasn't been merged yet, so just use what we need from it for now. Required for v8.1.1821.
* Tests(clipboard): Add test for block pasteshadmansaleh2021-07-01
|
* test, provider/define_spec.lua: fix few tests failerw72021-01-01
| | | | | fbd6a86 changes the behavior of :command-range and no longer allows arbitrary numbers. Adjust tests to reflect this behavior.
* vim-patch:8.1.2212: cannot see the selection type in :reg outputJan Edmund Lazo2020-12-25
| | | | | | | | Problem: Cannot see the selection type in :reg output. (Ayberk Aydın) Solution: Add c/l/b. (Christian Brabandt, closes vim/vim#5110, closes vim/vim#4546) https://github.com/vim/vim/commit/3691f1ee72b68a47e6dcc75927bfa46565cf3614 Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
* vim-patch:8.1.1056: no eval function for RubyAlex Genco2020-10-21
| | | | | | Problem: No eval function for Ruby. Solution: Add rubyeval(). (Ozaki Kiichi, closes vim/vim#4152) https://github.com/vim/vim/commit/e99be0e6d28fad96efd2b2be23fa38e7559e80e1
* Support for :perl, :perlfile, :perldo and perleval() (#12809)Justin M. Keyes2020-09-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * support for :perl, :perlfile, :perldo and perleval() * document that the perl provider doesn't currently work on Windows * document that the perl legacy interface is now also supported * added perleval() documentation * import legacy perl interface tests * only perl 5.22+ is supported * healtcheck: use g:perl_host_prog if its set instead using just 'perl' isn't correct as it may not be the version requested. ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest perl version
| * support for :perl, :perlfile, :perldo and perleval()Jacques Germishuys2020-08-30
| |
* | g:clipboard: allow command given as a list #12775DDoSolitary2020-09-01
|/ | | fixes #12768
* test: rewrite to multiple argumentskuuote2020-06-01
|
* runtime: fix remote plugin command fails at some casekuuote2020-05-31
| | | | fixes #12410
* provider/perl: test older versionsJan Edmund Lazo2020-01-20
|
* provider/perl: skip tests on WindowsJan Edmund Lazo2020-01-20
| | | | | | It worked for MINGW builds at one point but it keeps failing now because of perl dependencies or nvim session issues for tests (named pipes as sockets on Windows?).
* provider/perl: add basic testsJan Edmund Lazo2020-01-20
|
* system(), jobstart(): raise error on non-executable #11234Daniel Hahler2019-12-24
| | | | | | | | | | * tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
* tests/ui: cleanup illegitimate usages of "attr_ignore"Björn Linse2019-10-13
| | | | | "attr_ignore" is an anti-pattern, with snapshot_util() just include all the highlights already.
* provider: has("python3_dynamic") et al. #10980Justin M. Keyes2019-09-09
| | | | | | | | | | | Vim added more flags for testing yet more dimensions of its Python situation. Handle those in eval_has_provider(). vim-patch:8.0.1436: not enough information about what Python version may work Problem: Not enough information about what Python version may work. Solution: Add "python_compiled", "python3_compiled", "python_dynamic" and "python3_dynamic" values for has(). ref: https://github.com/neovim/neovim/pull/10942#issuecomment-529479500
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.