aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/scrollback_spec.lua
Commit message (Collapse)AuthorAge
* test: only trim trailing spaces in swapfile tests (#25341)zeertzjq2023-09-24
|
* test(terminal): fix scrollback test flakiness (#24708)zeertzjq2023-08-14
| | | | Problem: Terminal scrollback test is flaky. Solution: Use INTERACT flag so the job doesn't exit immediately.
* 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.
* 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>
* refactor: rename local API alias from a to apiLewis Russell2023-04-05
| | | | | | | | Problem: Codebase inconsistently binds vim.api onto a or api. Solution: Use api everywhere. a as an identifier is too short to have at the module level.
* 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())`.
* 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.
* fix(terminal): scrollback delete lines immediately #18832Javier Lopez2022-06-08
| | | | | | | | | | | | | | * on_scrollback_option_changed renamed to adjust_scrollback. The function name did not correspond to what it was doing. It is called unconditionally in every refresh of the terminal unrelated if the scrollback option was changed. * new on_scrollback_option_changed function, which calls refresh_terminal, which then calls adjust_scrollback * terminal_check_size is not the appropriate function to call when the option is changed since it only conditionally adjusts the scrollback. Use the new on_scrollback_option_changed fixes #15477 fixes #11811
* test: unskip tests on Windows (#18600)zeertzjq2022-05-18
| | | | | | Remove the command('qall!') from mksession_spec.lua because it prevents helpers.rmdir() from retrying. Allow extra trailing spaces when matching terminal lines.
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* fix(terminal): fix resize crash with pending scrollback (#14891)Sean Dewar2021-12-15
| | | | | | | | | | | | | refresh_scrollback assumes pending scrollback rows exist only if the terminal window height decreased (or the screen was full). However, after accumulating scrollback, it's possible in some cases for the terminal height to increase before refresh_scrollback is called via invalidation (especially when the terminal buffer isn't initially displayed in a window before nvim_open_term), which may crash. As we'll have enough room for some scrollback rows, just append them to the top of the buffer until it fills the window, then continue with the previous logic for any remaining scrollback rows if necessary.
* test/wildmode_spec: override $PS1Jan Edmund Lazo2020-12-01
| | | | | User config may set $PS1 for a colored prompt. It breaks the screen tests.
* 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/Screen:expect: replace "{IGNORE}" with "{MATCH:…}"Justin M. Keyes2019-11-09
| | | | ref #11004
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
* tests: fix flaky 'scrollback' option deletes lines (only) if necessary (#11003)Daniel Hahler2019-09-16
| | | | | | Using `screen:expect` with the complete grid appears to fix its flakiness. Fixes https://github.com/neovim/neovim/issues/10723.
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
* tests: scrollback_spec: use shell-test instead of awk (#10914)Daniel Hahler2019-09-04
| | | | Ref: #10804 Ref: b64af88
* CI/OpenBSD: run functional testsEdd Barrett2019-09-01
| | | | | | | | | | | Adapt some tests for OpenBSD: - scrollback_spec: - seq(1) is not available on OpenBSD: we'd use jot(1). - Instead use a (hopefully) portable awk(1) snippet. - channels_spec - job_spec - tui_spec
* ui/terminal: make terminal state redraw like any other stateBjörn Linse2019-05-14
| | | | | | | | | | | | | | | | | | | Previously, ordinary redraws were missing from terminal mode. Instead, there was an async callback that invoked update_screen() on terminal data regardless of mode (as if :redraw! was invoked by a timer). This created some issues: - async changes to an unrelated ordinary buffer were not always redrawn in terminal mode - screen cursor position was not properly updated in terminal mode (partial fix, will be properly fixed in a follow up PR) - ad-hoc logic was needed for interaction with special states such as inccommand or horizontal wildmenu. Instead redraw terminal mode just like any other state. This disables forced redraws in cmdline mode, which were inconisent which async changes to normal buffers (which are not redrawn in cmdline mode).
* terminal: Fix potential invalid local 'scrollback' (#9605)Justin M. Keyes2019-02-17
| | | | | | TermOpen autocmd may set local 'scrollback' to -1, this needs to be adjusted as in on_scrollback_option_changed(). fixes #9588 (OOM, out of memory)
* options: set 'scrollback' to -1 by default #9563Marco Hinz2019-02-04
| | | | | | | | | Makes the 'scrollback' option more consistent (same default for all buffers) and future-proof. - Default to -1 for all buffers, but treat it as an implementation detail. - Document range of 1 - 100_000. - New terminal buffer by default sets scrollback=10_000 if the global default is -1. - Existing terminal buffer: On entering terminal-mode or on refresh, if the user explicitly did `:set[local] scbk=-1`, the local value goes to 100_000 (max). (This is undocumented on purpose. Users should work with explicit values in the range of 1-100_000.)
* :terminal : set topline based on window height #8325Andrew Pyatkov2019-01-29
| | | | | closes #8324 closes #8556
* test: fix/speedup scrollback_specJan Edmund Lazo2018-10-22
| | | | | - fix: Use "set PROMPT=$" trick to satisfy screen:expect{any='%$'} - speedup: Use cmd.exe instead of powershell.
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* tests: introduce screen:expect{...} formBjörn Linse2018-08-27
|
* defaults: scrollback=10000 (#7556)Justin M. Keyes2017-11-14
|
* test/win: give up on this oneJustin M. Keyes2017-08-16
|
* test/win: place cursor at edge to tickle SIGWINCHJustin M. Keyes2017-08-16
|
* test: tty-test.c: restore win32 SIGWINCH handlerJustin M. Keyes2017-08-16
|
* test: cleanupJustin M. Keyes2017-08-16
|
* win/pty: log errorserw72017-08-16
|
* win/test: tty-test: print screen size explicitly with CTRL-Qerw72017-08-16
| | | | | tty-test.exe causes abnormal termination with low repeatability, try changing it so as not to use SIGWINCH.
* win: support :terminalerw72017-08-16
|
* 'scrollback': Allow :setlocal -1 on normal buffersJustin M. Keyes2017-04-20
| | | | Avoids a spurious :loadview error.
* 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: global 'scrollback' #6352Jakob Schnitzer2017-03-27
| | | | | | | | | | | Make the 'scrollback' option work like most other buffer-local options: - `:set scrollback=x` sets the global and local value - `:setglobal scrollback=x` sets only the global default - new terminal buffers inherit the global Normal buffers are still always -1, and :setlocal there is an error. Closes #6337
* test/scrollback: wiggle-room (#6256)Justin M. Keyes2017-03-11
|
* test: screen_setup(): Support `cols` parameter.Justin M. Keyes2017-02-26
|
* terminal: 'scrollback'Justin M. Keyes2017-02-26
| | | | Closes #2637
* 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
* tests: don't ignore highlights in terminal testsBjörn Linse2016-08-14
|
* 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.
* 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.