aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/screen.lua
Commit message (Collapse)AuthorAge
* 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>
* add cmdline mode to modechange of RPC and testschemzqm2016-11-30
| | | | | | | | use set_cursor_shape_bar for cmdline mode fix test of screen_basic_spec.lua & screen.lua comment fix
* ui: add tests for ui_mode_changeBjörn Linse2016-11-25
| | | | | Also fix snapshot_util() to work even if default_attr_ids is not a proper lua array.
* api/ui: add tests for popupmenu_external eventsBjörn Linse2016-08-29
| | | | update screen.lua to use new style nvim_ui_attach
* tests: add note to expect() message about snapshot_util()Bjö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.
* cmdline: Redraw the cmdline after processing eventsBjörn Linse2016-05-24
| | | | | | | vim-patch:7.4.1603 TODO(bfredl): if we allow events in HITRETURN and ASKMORE states, we need to add the necessary redraws as well.
* test: Screen also checks 'special' when testing attribute equalityAdnoC2016-05-17
|
* test: Add a test for the new guisp highlighting feature.KillTheMule2016-05-17
| | | | Screen.lua needed a little cosmetical adjustment to print out the color nicely.
* test: Fix tests failingAdnoC2016-05-17
|
* Update lua client to 0.0.1-24Thiago de Arruda2016-04-13
| | | | | The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that.
* Tests: fix according to lualintMarco Hinz2016-02-29
|
* functests: Improve screen:expect error reportingZyX2016-02-28
|
* test: change CI_TARGET reference to CIJustin M. Keyes2016-01-01
| | | | | | | | Travis defines[1] $CI for its builds, whereas $CI_TARGET is a Neovim-specific env var from 6483a198e4bee1e80683ba12e061616c3e6c4090 that lost prominence in d2eb4a934683b5da63000d8b79a0d4c9a314d1c0. [1] https://docs.travis-ci.com/user/environment-variables/
* test/functional: clean up according to luacheck (part 2)Marco Hinz2015-11-23
|
* test/functional: clean up according to luacheck (part 1)Marco Hinz2015-11-23
|
* functests: Do not forget about -i argumentZyX2015-10-23
| | | | Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
* test: Add basic tests for the TUIThiago de Arruda2015-10-01
| | | | The tests use `termopen` to spawn nvim and verify the TUI.
* api: vim_err_write: add tests for multiline handlingBjörn Linse2015-09-16
|
* Notify attached UIs whenever menus changeRobin Allen2015-08-21
| | | | | This adds a redraw notification "update_menu" which is sent whenever Vim's menus are changed by the :menu command and friends.
* tui: Use underline cursor in Replace modeOmar Sandoval2015-07-26
| | | | | | | This is a port of my original contribution to Vim, added in 7.4.687 (https://github.com/vim/vim/commit/v7-4-687). The TUI code has been heavily refactored (see esp. 25ceadab37edba13f5afa78d8b4723da03ef35f0), so this required some translation, but the logic is the same.
* api: Simplify UI API on mode changeOmar Sandoval2015-07-26
| | | | | | | Currently, there are two functions in the UI API that are called when the mode changes: insert_mode() and normal_mode(). These can be folded into a single mode_change() entrypoint which can do whatever it wants based on the mode it is passed, limited to INSERT and NORMAL for now.
* test: Increase determinism in screen_basic_spec testsThiago de Arruda2015-07-16
|
* doc: Fix some typos and trailing whitespace. #2875Lucas Hoffmann2015-06-21
|
* tests/ui: warn when the correct state was seen temporarily.Björn Linse2015-04-03
| | | | Helped-by: Thiago de Arruda <tpadilha84@gmail.com>
* test/ui: add redraw debug utilBjörn Linse2015-04-03
|
* test: Add terminal testsThiago de Arruda2015-03-25
| | | | | | | | | | | | - Modify tty-test to allow easier control over the terminal - Add a new directory with various terminal tests/specifications - Remove a pending job/pty test. - Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish) - Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to deliver signals on OSX. Might be related to the problem fixed by @bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe to deliver signals to the main thread, which might be blocking in some situations)
* test: Extract code to spawn nvim into the "spawn" helper functionThiago de Arruda2015-03-24
| | | | | | This is can be used for spawning nvim outside a test context. Also refactor screen.lua to use this function when loading the color map(It is better because the GDB/VALGRIND environment variables are ignored)
* ui: Refactor so that busy state won't be the defaultThiago de Arruda2015-03-18
| | | | | | | | | | | Even though assuming nvim is busy most times is simpler, it has a problem: A lot of unnecessary busy_start/busy_stop notifications are sent to the UI. That's because in the majority of scenarios almost no time is spent between `event_poll` calls. This restores the normal behavior which is to call busy_start only when nvim is going to perform some task that can take a significant amount of time. Also improve the usage of buffering in the TUI when changing the cursor state.
* test: Only display cursor marker in screen tests if nvim is not busyThiago de Arruda2015-03-16
|
* ui: Replace cursor_{on,off} by busy_{stop,start}Thiago de Arruda2015-03-15
| | | | | | | | | | | | | | | | | | | | | | | | Switching cursor off is only necessary in two occasions: - When redrawing to avoid terminal flickering - When the editor is busy The first can now be handled by the TUI, so most calls to ui_cursor_off can be removed from the core. So, before this commit it was only necessary to switch the cursor off to notify the user that nvim was running some long operation. Now the cursor_{on,off} functions have been replaced by busy_{stop,start} which can be handled in a UI-specific way(turning the cursor off or showing a busy indicator, for example). To make things even more simpler, nvim is always busy except when waiting for user input or other asynchronous events: It automatically switches to a non-busy state when the event loop is about to be entered for more than 100 milliseconds. `ui_busy_start` can be called when its not desired to change the busy state in the event loop (As its now done by functions that perform blocking shell invocations).
* tests/ui: Also test character at cursorBjörn Linse2015-03-09
|
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code
* test: Remove -g flag from pynvim call in Screen.debugThiago de Arruda2015-02-20
| | | | The flag is no longer valid(pynvim always starts a GUI)
* test: Increase default_screen_timeout when running on travisThiago de Arruda2015-02-16
| | | | | | Some screen tests such as system/ctrl+c(viml_system_spec.lua) can take some time to respond(default kill timeout is 2 seconds for an interrupted job) and fail when running under a slow environment such as travis.
* api/vim: allow guis and tests to retrieve the entire color tableBjörn Linse2015-02-02
|
* test/ui: update documentation for screen testsBjörn Linse2015-02-02
|
* test/ui: enable strict mode by default (and in existing tests)Björn Linse2015-02-02
|
* test/ui: more informative "unexpected highlight" errorsBjörn Linse2015-02-02
|
* test: Make default screen timeout depend on the VALGRIND env varThiago de Arruda2015-01-23
| | | | | | While running under valgrind, the screen can take significantly longer to update(especially on travis) so a higher timeout can be required. Also reduce the timeout when not running on valgrind.
* test: Fix hanging test suite after failuresThiago de Arruda2015-01-23
| | | | | | | | | | | | | | | | When a test that fails leaves nvim in a 'Press Enter...' state, the whole suite will hang because the `qa!` command executed before the next test won't be processed until '<enter>' is sent. Now the lua client can send a signal with when `Session:exit()` is called, so the `qa!` request is no longer necessary. Also: - Set noswapfile at startup to prevent tests from leaving .s* swap files(should also improve test environment determinism) - Use `assert(false, msg) instead of `error(msg)` to report screen assertion failures.
* tests/ui: strict modeBjörn Linse2015-01-23
|
* tests/ui: snapshot utilBjörn Linse2015-01-23
|
* test: Fix screen.lua eol_clear method.Thiago de Arruda2015-01-22
|
* test: Add more functional test to cover new codeThiago de Arruda2015-01-15
| | | | | | | | | - emulate gui_running and terminal colors - scrolling/clearing regions - mouse wheel scrolling - setting icon/title - :stop/:suspend - screen resize
* ui: Implement set_{title,icon}Thiago de Arruda2015-01-14
|
* test: Add Screen.debug for inspecting screens of hanging testsThiago de Arruda2015-01-13
|
* ui: Add 'rgb' parameter to ui_attachThiago de Arruda2015-01-13
| | | | When set to false, nvim will send cterm color numbers with `highlight_set`.
* ui: Fix ui resizing and change some method namesThiago de Arruda2015-01-13
|
* ui: Add update_fg/update_bg methodsThiago de Arruda2015-01-13
| | | | | It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.