aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/job_spec.lua
Commit message (Collapse)AuthorAge
* fix(jobs): do not block UI when jobwait() doesn't block (#31803)Gregory Anders2025-01-01
|
* feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes2024-12-19
| | | | | | | | | | | | Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
* feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
* 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): rename terminal/testutil.lua => testterm.lua #30372Justin M. Keyes2024-09-15
| | | | | This module is generally used by any tests that need the full Nvim TUI instead of `screen.lua`. Thus it should live in `functional/` instead of in `functional/terminal/`.
* refactor(tests): more global highlight definitionsbfredl2024-05-26
|
* 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.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test(core/job_spec): skip exit test if "sleep" command missing (#28137)zeertzjq2024-04-01
|
* test: use matches(...) instead of ok(string.find(...)) (#28111)zeertzjq2024-03-30
|
* refactor(tests): all screen tests should use highlightsbfredl2024-03-23
| | | | | | | | | | | | | | | | | | | | | | | This is the first installment of a multi-PR series significantly refactoring how highlights are being specified. The end goal is to have a base set of 20 ish most common highlights, and then specific files only need to add more groups to that as needed. As a complicating factor, we also want to migrate to the new default color scheme eventually. But by sharing a base set, that future PR will hopefully be a lot smaller since a lot of tests will be migrated just simply by updating the base set in place. As a first step, fix the anti-pattern than Screen defaults to ignoring highlights. Highlights are integral part of the screen state, not something "extra" which we only test "sometimes". For now, we still allow opt-out via the intentionally ugly screen._default_attr_ids = nil The end goal is to get rid of all of these eventually (which will be easier as part of the color scheme migration)
* fix(process): start pty process eof timer on main thread (#27625)zeertzjq2024-02-26
|
* refactor(tests): get channel id via nvim_get_chan_info #27441Justin M. Keyes2024-02-12
| | | Minor "best practices" nudge.
* 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: remove helpers.sleep()Lewis Russell2024-01-12
|
* test: do not inject vim module into global helpersLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test(core/job_spec): fix flakiness (#26623)zeertzjq2023-12-18
|
* fix(stream): do not close handle if it is already closing (#26537)Gregory Anders2023-12-12
| | | | | uv_close asserts that a handle is not already closing. We can guard against this assertion failure by manually checking the handle's closing status ourselves.
* 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
* test: use termopen() instead of :terminal more (#26462)zeertzjq2023-12-08
|
* fix(f_wait): flush UI before blocking (#25962)zeertzjq2023-11-10
|
* fix(job-control): make jobwait() flush UI after hiding cursor (#25927)zeertzjq2023-11-08
|
* test: unskip working Windows tests (#22537)dundargoc2023-03-13
| | | | Some tests that were previously not working have started to work again for unspecified reasons, so let's enable them.
* 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())`.
* revert: "jobstart(): Fix hang on non-executable cwd #9204" (#19826)zeertzjq2022-08-18
| | | | | This reverts commit c4c74c3883aa3122c0c877ca8dd7b26beb5cc4aa. LibUV already gives an error for this, so this isn't needed.
* vim-patch:7.4.1168 (#19645)zeertzjq2022-08-13
| | | | | | Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay Pavlov) Solution: Make the string "v:true" instead of "true". https://github.com/vim/vim/commit/f48aa160fdd7b8caa7678e1a2139244dd2bdc547
* test(job_spec): accept alternate messages for "append environment" testsJames McCoy2022-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests commonly fail in Debian with [ ERROR ] test/functional/core/job_spec.lua @ 81: jobs append environment with pty #env test/functional/helpers.lua:198: ============================================================================== test/helpers.lua:73: Expected objects to be the same. Passed in: (table: 0x2aa4bcc1040) { *[1] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'hello world abc' } } } } Expected: (table: 0x2aa4bcc0d70) { *[1] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'hello world abc' *[2] = '' } } } } Since the test is validating the "hello world abc" message, not the newlines, accept either set of message sequences.
* refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* test(job_spec): remove Xtest_jobstart_env log filezeertzjq2022-05-29
|
* 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
* docs: typo fixes (#17859)dundargoc2022-04-15
| | | | | | | | | | Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com> Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: rwxd <rwxd@pm.me> Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* test: remove checks to see if current CI job is travis or appveyorDundar Göc2022-02-17
|
* feat(api): nvim_get_chan_info: include "argv" for jobs #15537Justin M. Keyes2021-09-01
| | | ref #15440
* Add test case for 'null' stdin modeGregory Anders2021-07-12
|
* test(job_spec): Test handling of case-insensitively matching env varsJames McCoy2021-05-18
| | | | | Since Windows is case-insensitive, there should only be a single env var in visible in the resulting job. However, non-Windows should see both.
* api: fix use-after-free in nvim_chan_sendBjörn Linse2021-04-04
|
* test(job): Ensure job-specific env var overrides global env varJames McCoy2021-01-31
|
* Pass environment on to pty processes on WindowsJames McCoy2021-01-31
| | | | | | | | | | | | vim-patch:8.2.0239: MS-Windows: 'env' job option does not override existing vars Problem: MS-Windows: 'env' job option does not override existing environment variables. (Tim Pope) Solution: Set the environment variables later. (Yasuhiro Matsumoto, closes vim/vim#5485, closes vim/vim#5608) https://github.com/vim/vim/commit/355757aed6ae2ae5446882570d89f243e4805937 Co-authored-by: erw7 <erw7.github@gmail.com>
* Use dict_T to pass env vars to process spawning codeJames McCoy2021-01-31
| | | | Co-authored-by: Matthieu Coudron <mattator@gmail.com>
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* test: Fix failing test in case of special .bashrc (#12920)Omri Sarig2020-09-28
| | | | | | | | | | | | | | | | | | | The test of "replace environment" in the test module of `test/functional/core/job_spec.lua` failed in case the bashrc file of the user running the test has special actions in it (such actions were printing to the screen from inside this file, or changing the bash mode to be vi). In order to fix this problem, the test now sets the shell to be `/bin/sh` before running the command. Setting the shell to be `/bin/sh` causes the running shell to run without the configuration of the user, and so the test passes even in case of special .bashrc. This change was done only for platforms other than Windows since it is not relevant in windows. The fix was applied to the specific test, even though it is possible that related issues will arise in other tests. It seems like a big overhead to make the fix work on all the possible tests, and it does not worth this cost.
* Fix f_jobstop() failed loudlyBilly Su2020-01-22
| | | | | | The return value of jobstop() @return 1 for valid job id 0 for invalid id, including jobs have exited or stopped
* 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
* Add negative test for type of job's env optionJames McCoy2019-12-12
|