aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/output_spec.lua
Commit message (Collapse)AuthorAge
* refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
* test: fix dependencies between test cases (#23343)zeertzjq2023-04-27
| | | Discovered using --shuffle argument of busted.
* ci: bump to windows 2022dundargoc2023-03-11
| | | | Skip failing funcitonaltests. Use jobstart() instead termopen() for oldtests to prevent CI freezing.
* 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())`.
* 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.
* 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: 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.
* test: use helpers.pending_win32(pending) instead of iswin()zeertzjq2022-02-26
|
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* test: rewrite powershell tests to remove timeoutJan Edmund Lazo2020-11-20
| | | | TSAN kept failing and Appveyor sometimes fails on the same test.
* ci: test powershell core on LinuxJan Edmund Lazo2019-12-31
|
* tests: fix non-controversial misuse of `pending` (#11247)Daniel Hahler2019-10-18
| | | Ref: https://github.com/neovim/neovim/pull/11184
* 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.
* test: "!:&" works with powershell #11201Jan Edmund Lazo2019-10-10
| | | Removed 'echo' alias because it does not behave like POSIX echo.
* doc: update shellquote for powershell #11122Jan Edmund Lazo2019-10-10
| | | shellquote is not treated like shellxquote for non-quote values.
* test/uname(): always lowercaseJustin M. Keyes2019-09-01
|
* test/OpenBSD: skip some testsJustin M. Keyes2019-09-01
| | | | Temporary workaround to unblock CI for OpenBSD.
* shell-test: remove REP_NODELAY, less delay with REPDaniel Hahler2019-08-30
| | | | | | | | | REP_NODELAY was added because REP delayed too much. This changes REP to only add a delay on every 100th line instead. This helps to cover the additional pulse steps with out_data_decide_throttle, which would have required to change REP_NODELAY anyway.
* test: win: enable output_spec testJan Edmund Lazo2019-08-18
|
* tests: output_spec: use shell-test REP_NODELAY (#10726)Daniel Hahler2019-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix flaky "shell command :! throttles shell-command output greater than ~10KB:": [ RUN ] shell command :! throttles shell-command output greater than ~10KB: warning: Screen changes were received after the expected state. This indicates indeterminism in the test. Try adding screen:expect(...) (or wait()) between asynchronous (feed(), nvim_input()) and synchronous API calls. - Use screen:redraw_debug() to investigate; it may find relevant intermediate states that should be added to the test to make it more robust. - If the purpose of the test is to assert state after some user input sent with feed(), adding screen:expect() before the feed() will help to ensure the input is sent when Nvim is in a predictable state. This is preferable to wait(), for being closer to real user interaction. - wait() can trigger redraws and consequently generate more indeterminism. Try removing wait(). ERR test/functional/ui/screen.lua:579: Failed to match any screen lines. Expected (anywhere): " %." Actual: |XXXXXXXXXX 591 | |XXXXXXXXXX 592 | |XXXXXXXXXX 593 | |XXXXXXXXXX 594 | | | | | |{3:-- TERMINAL --} | stack traceback: test/functional/ui/screen.lua:579: in function '_wait' test/functional/ui/screen.lua:367: in function 'expect' test/functional/ui/output_spec.lua:63: in function <test/functional/ui/output_spec.lua:53> Log: https://travis-ci.org/neovim/neovim/jobs/569082705#L5355 (gcc-functionaltest-lua)
* test: isCI(): add "name" parameterJustin M. Keyes2019-08-05
|
* test/CI: skip "throttles output" test on Travis macOS #9721Justin M. Keyes2019-03-12
| | | | | Travis macOS is not fast enough to run this test reliably. The test depends on the system producing output faster than the Nvim TUI can handle it.
* Mark "shell command :! throttles shell-command output greater than ~10KB" ↵James McCoy2019-01-01
| | | | fragile
* defaults: background=dark #2894 (#9205)Justin M. Keyes2018-11-20
| | | | | | | | | | | | | By historical accident, Nvim defaults to background=light. So on a dark background, `:colorscheme default` looks completely wrong. The "smart" logic that Vim uses is confusing for anyone who uses Vim on multiple platforms, so rather than mimic that, pick the (hopefully) most common default. - Since Neovim is dark-powered, we assume most users have dark backgrounds. - Most of the GUIs tend to have a dark background by default. ref #6289
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* tests: introduce screen:expect{...} formBjörn Linse2018-08-27
|
* functionaltest: Use octal escapes for printfJames McCoy2018-06-13
| | | | | | | | According to POSIX[0], only octal escapes are supported by the printf command. GNU coreutils' printf and some shells' builtin printf versions which support hex escapes, but dash and non-GNU printf do not. [0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* win: enable backtick_expansion and shell output testsJan Edmund Lazo2018-02-10
|
* shell: handle split-up UTF-8 sequencesBjörn Linse2018-02-10
|
* tests: integrate ex_cmds/bang_filter_spec into ui/output_specBjörn Linse2018-02-10
| | | | they test the same thing. Filtering is tested elsewhere.
* shell: support bellBjörn Linse2018-02-10
|
* test: :! print binary data, control charsJustin M. Keyes2018-02-07
| | | | | | | | | | closes #5442 closes #4142 ref #6618 ref #4376 ref #7844 ref #2958 ref #4338
* shell: add test for binary and multibyte outputBjörn Linse2018-02-06
| | | | Also update existing tests for new (vim-compatible) newline behavior
* defaults: 'showcmd', 'belloff', 'ruler'Justin M. Keyes2017-03-16
| | | | | | | | | | | - Vim "unix default" of 'noshowcmd' is serving few users. And it's inconsistent. - 'ruler' and 'belloff=all' improve the out-of-the-box experience. - Continue to use 'noshowcmd' and 'noruler' by default in the functional tests to keep them fast. TODO: Add a "disable slow stuff" command or mapping to address the use-case of a very slow terminal connection.
* test: Fix broken test.Justin M. Keyes2017-01-24
|
* ci: XXX: Disable "throttle" test on Travis macOS.Justin M. Keyes2017-01-23
|
* ci: Disable "CTRL-C interrupts :global" testJustin M. Keyes2017-01-19
| | | | | This test is low-value, high-cost. It's slow, and sometimes crashes luajit. It's still enabled on local runs, that's good enough.
* os/shell: do_os_system(): Always show last chunk.Justin M. Keyes2016-12-10
| | | | | | | | | | | | | | | | | | | | | This ameliorates use-cases like: :!cat foo.txt :make where the user is interested in the last few lines of output. Try these shell-based ex-commands before/after this commit: :grep -r '' * :make :!yes :!grep -r '' * :!git grep '' :!cat foo :!echo foo :!while true; do date; done :!for i in `seq 1 20000`; do echo XXXXXXXXXX $i; done In all cases the last few lines of the command should always be shown, regardless of where throttling was triggered.
* os/shell: Throttle :! output, pulse "..." message.Justin M. Keyes2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly improves responsiveness when :! spams MB or GB of output: :!yes :!while true; do date; done :!git grep '' :grep -r '' * After ~10KB of data is seen from a single :! invocation, output will be skipped for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the behavior alternates at every: * 10KB received * ~1s throttled This also avoids out-of-memory which could happen with large :! outputs. Note: This commit does not change the behavior of execute(':!foo'). execute(':!foo') returns the string ':!foo^M', it captures *only* Vim messages, *not* shell command output. Vim behaves the same way. Use system('foo') for capturing shell command output. Closes #1234 Helped-by: oni-link <knil.ino@gmail.com>
* Restore output_spec assertion dropped in f332ebaJames McCoy2016-09-14
|
* tests/ui: Stop the terminal job after testingJames McCoy2016-09-14
| | | | | | When running the tests in a contained environment, the lingering terminal processes prevent the unmounting of the filesystems in the contained environment.
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* tests: don't ignore highlights in terminal testsBjörn Linse2016-08-14
|
* test: output_specJustin M. Keyes2016-07-14
Reference: https://github.com/neovim/neovim/issues/3772#issuecomment-162334005