aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/ex_terminal_spec.lua
Commit message (Collapse)AuthorAge
* refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano2025-01-14
|
* 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`.
* 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.
* 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.
* 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
|
* fix(edit): don't go to Terminal mode when stopping Insert mode (#27033)zeertzjq2024-01-16
|
* 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
* refactor: format test/*Justin M. Keyes2024-01-03
|
* 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(ex_terminal_spec): match descriptions (#26314)zeertzjq2023-11-30
|
* test: :terminal when 'shell' uses backslasheszeertzjq2023-11-30
|
* test(ex_terminal_spec): unskip tests that work on Windows (#26310)zeertzjq2023-11-30
|
* fix(terminal): avoid Insert mode in Terminal buffer (#25820)zeertzjq2023-10-29
|
* test: update tests for auto-closing :term buffersGregory Anders2023-08-10
| | | | | | | | The terminal buffer closes automatically when using `:terminal` and the command exits without an error. This messes up some tests that expect the terminal buffer to still be open. We can force the buffer not to close by passing an argument to `:terminal`. This can be anything, since the shell-test stub simply prints whatever argument it's given.
* test: reduce flakiness (#24443)zeertzjq2023-07-23
| | | | | | | Avoid consecutive RPC requests involving :startinsert or :stopinsert, because consecutive RPC requests may be processed together, before the :startinsert or :stopinsert takes effect. Also change some feed_command() to command() to make tests faster.
* 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: 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())`.
* ci: add cirrus to isCI function to skip tests (#20526)dundargoc2022-10-17
| | | | The environment variable CIRRUS_CI is manually passed to RunTests.cmake as it doesn't get passed when using cmake script mode.
* ci: move BSD jobs from sourcehut to Cirrus CI #19616dundargoc2022-09-08
| | | | | | | | | | | | | | | | | | | dispatch.sr.ht is being deprecated, meaning that using sourcehut CI won't be possible (see https://github.com/neovim/neovim/issues/19609). Since Github Actions doesn't provide any BSD runners an external service is required and Cirrus CI seems like a good replacement for sourcehut. Initially experimented with using FreeBSD and OpenBSD virtual machines in GitHub Actions, but Cirrus has been a much better fit with better performance, logs and overall experience. Failing tests are automatically skipped on FreeBSD regardless if it's on CI or not. Ideally these tests should only be skipped in CI with the help of `isCI` helper function. Unfortunately, the tests don't recognize the environment variable CIRRUS_CI even if it's set manually. This workaround is good enough for the time being, but we might want to only skip tests when using the CI (or even better, fix the failing tests). Closes: https://github.com/neovim/neovim/issues/19609
* 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.
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq2021-10-09
| | | | | Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856) https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* 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.
* tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588)Daniel Hahler2019-12-22
| | | | | | | | | | | | | | | | | | | | | | | Flaky failure (Travis CI, macOS): [ RUN ] :terminal (with fake shell) works with gf: 10518.41 ms FAIL test/functional/terminal/ex_terminal_spec.lua:248: Row 1 did not match. Expected: |*^ready $ echo "scripts/shadacat.py" | |* | |*[Process exited 0] | |:terminal echo "scripts/shadacat.py" | Actual: |*^ | |*[Process exited 0] | |* | |:terminal echo "scripts/shadacat.py" | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:579: in function '_wait' test/functional/ui/screen.lua:361: in function 'expect' test/functional/terminal/ex_terminal_spec.lua:248: in function <test/functional/terminal/ex_terminal_spec.lua:245>
* test: use shell-test (avoid system shell)Justin M. Keyes2019-09-01
|
* tests: ex_terminal_spec: add test for previous leak (#10450)Daniel Hahler2019-07-08
| | | Closes https://github.com/neovim/neovim/pull/4766.
* tests: fix flaky "terminal (with fake shell) with not arguments …" (#10401)Daniel Hahler2019-07-02
| | | | | | `retry()` would only try it three times (waiting for 20ms in between), despite the large timeout. Fixes https://github.com/neovim/neovim/issues/10265.
* Reset stop_insert_mode in terminal_enter rather than terminal_checkglacambre2019-04-20
| | | | | | | | | | | Problem: Using `:stopinsert` while in normal mode in a terminal buffer prevents neovim from entering insert mode. Solution: Move `stop_insert_mode = false` from terminal_check to terminal_enter to be consistent with edit.c, as suggested by bfredl in #9889. Closes https://github.com/neovim/neovim/issues/9889.
* :stopinsert should leave terminal-mode #9856glacambre2019-04-08
| | | | | | | | | Problem: Calling :stopinsert from RPC while in terminal-mode does not go back to normal-mode. Solution: Implement a check() handler for state_enter(), adapted from insert_check(). Fix #7807
* tests: introduce screen:expect{...} formBjörn Linse2018-08-27
|
* terminal: flush vterm output buffer on pty output #8486林千里2018-06-08
| | | | | | | | | | | Fixes #4151 libvterm uses an "output buffer" for terminal reporting (e.g. \e[6n to report cursor position) Flush it in on_channel_output() not just terminal_send_key() See also this line from pangoterm: https://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/607/pangoterm.c#L2159
* win: defaults: 'shellcmdflag', 'shellxquote' #7343Jan Edmund Lazo2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | closes #7698 Wrapping a command in double-quotes allows cmd.exe to safely dequote the entire command as if the user entered the entire command in an interactive prompt. This reduces the need to escape nested and uneven double quotes. The `/s` flag of cmd.exe makes the behaviour more reliable: :set shellcmdflag=/s\ /c Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to cmd.exe `echo` builtin) even if it is wrapped in double quotes. Example: :: internal echo > cmd /s /c " echo foo\:bar" " foo\:bar" :: cygwin echo.exe > cmd /s /c " "echo" foo\:bar" " foo:bar
* :terminal Enter/Leave should not increment jumplistJustin M. Keyes2018-02-07
| | | | | | | | | | | The old behavior is probably not justified, for the usual reason: terminal buffers may have interactive processes, so cursor placement is arbitrary, therefore tracking it in the jumplist is useless (or worse). N.B.: per the docstring for `checkpcmark()` it looks like we were calling `checkpcmark()` and `setpcmark()` in the wrong order. closes #3723
* win: enable tests in ex_terminal_specJan Edmund Lazo2018-01-06
|
* test: ex_terminal_spec.lua: retry flaky test (#7245)Justin M. Keyes2017-09-07
| | | https://api.travis-ci.org/jobs/271833660/log.txt
* Repair ex_terminal_spec functional testsDrew Neil2017-08-21
|
* win/test: enable more :terminal testsJustin M. Keyes2017-08-16
| | | | | | To deal with SIGWINCH limitations on Windows, change some resize tests to _shrink_ the screen width. ... But this didn't work, so still ignoring those tests on Windows.
* win: support :terminalerw72017-08-16
|
* tests: detect invalid helpers.sleepBjörn Linse2017-04-21
|
* ui: add tests for new cursor shape modesBjörn Linse2017-04-21
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* terminal: Support extra arguments in 'shell'. #4504Jack Bracewell2017-03-17
| | | | | | | | | | | | | Tokenize p_sh if used as default in ex_terminal(). Previously p_sh was used as the first arg in a list when calling termopen(), this would try to call an untokenized version of shell, meaning if you had an argument in 'shell': set shell=/bin/bash\ --login the command would fail. Helped-by: oni-link <knil.ino@gmail.com> Closes #3999
* terminal: Follow output only if cursor is at end.Justin M. Keyes2017-02-26
| | | | | | Closes #2257 Closes #2636 References #2683
* terminal: 'scrollback'Justin M. Keyes2017-02-26
| | | | Closes #2637