aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/ex_terminal_spec.lua
Commit message (Collapse)AuthorAge
* 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
* eval.c: Fix findfile(), :find, gf in :terminal. #6009Tommy Allen2017-01-31
| | | | Closes #4299
* test: :terminal should not interrupt Press-ENTERJustin M. Keyes2016-10-20
| | | | References #2748
* test/terminal: Cover race when :term shell process exits.Justin M. Keyes2016-10-12
| | | | | | References #5445 See https://github.com/neovim/neovim/pull/5445#issuecomment-252529766
* Merge pull request #5225 from equalsraf/windows-functionaltestsBjörn Linse2016-08-31
|\ | | | | Enable functional tests in Appveyor
| * Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
| |
* | api/ui: add tests for popupmenu_external eventsBjörn Linse2016-08-29
|/ | | | update screen.lua to use new style nvim_ui_attach
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
* test: term_close use-after-freeJustin M. Keyes2016-05-15
| | | | References #4393
* ex_terminal(): fix double-freeJustin M. Keyes2016-05-15
| | | | Closes #4554
* test: ex_terminal() double-freeJustin M. Keyes2016-05-15
| | | | References #4554
* test/functional: clean up according to luacheck (part 1)Marco Hinz2015-11-23
|
* Add TermClose eventMarco Hinz2015-11-15
| | | | | | | | A terminal buffer now exits with: [Process exited <return value>] You can hook into it. E.g. :au TermClose * call feedkeys('<cr>') Closes #2293.
* term: use an argument vector for termopen().Scott Prager2015-05-02
Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which caused the functional tests to fail on some systems due to the process not "owning" the terminal. Also, it is inconsistent with jobstart(). Modify termopen() so that &shell is not invoked, but maintain the old behaviour with :terminal. Factor the common code for building the argument vector from jobstart() and modify the functional tests to call termopen() instead of :terminal (fixes #2354). Also: * Add a 'name' option for termopen() so that `:terminal {cmd}` produces a buffer named "term//{cwd}/{cmd}" and termopen() users can customize the name. * Update the documentation. * Add functional tests for `:terminal` sinse its behaviour now differs from termopen(). Add "test/functional/fixtures/shell-test.c" and move "test/functional/job/tty-test.c" there, too. Helped-by: Justin M. Keyes <@justinmk>