aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
Commit message (Collapse)AuthorAge
...
* test/wildmode_spec: fix flaky test (#10947)Justin M. Keyes2019-09-05
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/wildmode_spec: fix flaky test a00eb23c27da fixed one race, but not this one: [ ERROR ] test/functional/ui/wildmode_spec.lua @ 84: 'wildmenu' is preserved during :terminal activity test/functional/ui/screen.lua:587: Row 1 did not match. Expected: |* | | | | | |define jump list > | |:sign define^ | Actual: |*0: !terminal_output! | | | | | |define jump list > | |:sign define^ | 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:587: in function '_wait' test/functional/ui/screen.lua:370: in function 'expect' test/functional/ui/wildmode_spec.lua:22: in function 'expect_stay_unchanged' test/functional/ui/wildmode_spec.lua:92: in function <test/functional/ui/wildmode_spec.lua:84> * fixup! test/wildmode_spec: fix flaky test
| * fixup! test/wildmode_spec: fix flaky testJustin M. Keyes2019-09-04
| |
| * test/wildmode_spec: fix flaky testJustin M. Keyes2019-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a00eb23c27da fixed one race, but not this one: [ ERROR ] test/functional/ui/wildmode_spec.lua @ 84: 'wildmenu' is preserved during :terminal activity test/functional/ui/screen.lua:587: Row 1 did not match. Expected: |* | | | | | |define jump list > | |:sign define^ | Actual: |*0: !terminal_output! | | | | | |define jump list > | |:sign define^ | 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:587: in function '_wait' test/functional/ui/screen.lua:370: in function 'expect' test/functional/ui/wildmode_spec.lua:22: in function 'expect_stay_unchanged' test/functional/ui/wildmode_spec.lua:92: in function <test/functional/ui/wildmode_spec.lua:84>
* | anchor float to buffer positionBjörn Linse2019-09-04
|/ | | | vim-patch:8.1.1645: cannot use a popup window for a balloon
* test/mode_spec: increase 'matchtime' to fix flakyJustin M. Keyes2019-09-04
| | | | | fix #10941 regressed by 7ed212262242
* Merge pull request #10926 from blueyed/fix-echon-qBjörn Linse2019-09-04
|\ | | | | Check got_int in msg_multiline_attr with ex_echo
| * move testDaniel Hahler2019-09-04
| |
| * Check got_int in msg_multiline_attrDaniel Hahler2019-09-04
| | | | | | | | | | | | Fixes quitting the pager using `q`. Fixes https://github.com/neovim/neovim/issues/10923.
* | test/wildmode_spec: fix flaky testJustin M. Keyes2019-09-03
|/ | | | | | | | | | | | | | | | | | | | | | [ ERROR ] test/functional\ui\wildmode_spec.lua @ 84: 'wildmenu' is preserved during :terminal activity test\functional\ui\screen.lua:587: Row 1 did not match. Expected: |*:sign | |*define place | |*jump undefine | |*list unplace | |*:sign ^ | Actual: |*0: !terminal | |* | |*^ | |*~ | |* | stack traceback: test\functional\ui\screen.lua:587: in function '_wait' test\functional\ui\screen.lua:370: in function 'expect' test/functional\ui\wildmode_spec.lua:22: in function 'expect_stay_unchanged' test/functional\ui\wildmode_spec.lua:103: in function <test/functional\ui\wildmode_spec.lua:84>
* screen: initialize screen properly with early `set display-=msgsep`Björn Linse2019-09-02
| | | | | | | | | | | | | Currently `nvim -u NORC --cmd "set display-=msgsep"` will still allocate the message grid and remove it just afterwards. While inefficient, we must make sure update_screen() re-validates the default_grid completely when this happens. Fix some invalid logic: don't reallocate msg_grid on resize when the grid is not used. Elide a too early ui_flush() on startup, which caused an invalid cursor position to be used.
* test/uname(): always lowercaseJustin M. Keyes2019-09-01
|
* test/OpenBSD: skip some testsJustin M. Keyes2019-09-01
| | | | Temporary workaround to unblock CI for OpenBSD.
* screen.lua: dump payload on handler failureJustin M. Keyes2019-09-01
| | | | | | | | | | | | For debugging failures like: test/functional/helpers.lua:240: test/functional/ui/screen.lua:898: bad argument #1 to 'unpack' (table expected, got number) test/functional/helpers.lua:240: test/functional/ui/screen.lua:708: attempt to index local 'item' (a number value) ref #10804
* Merge pull request #10400 from bfredl/msg_gridBjörn Linse2019-09-01
|\ | | | | Dedicated message grid.
| * test/ui: update tests for new msg_grid implementationBjörn Linse2019-09-01
| |
| * test/ui: make screen:expect() print full state when height does not matchBjörn Linse2019-09-01
| |
* | test: use shell-test (avoid system shell)Justin M. Keyes2019-09-01
| |
* | test/inccommand_spec: avoid indeterminismJustin M. Keyes2019-09-01
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use shell-test.c to avoid the squishiness of system shells. - Use screen:expect_unchanged() to avoid hardcoded (brittle) test. Fails correctly if 5020daa6e5ce is reverted (remove terminal_check(), restore redraw() in refresh_timer_cb()): [ ERROR ] test/functional/ui/inccommand_spec.lua @ 2550: :substitute with inccommand during :terminal activity test/functional/helpers.lua:402: retry() attempts: 2 test/functional/ui/screen.lua:579: Row 8 did not match. Expected: |foo bar baz | |bar baz fox | |bar foo baz | |{15:~ }| |{15:~ }| |{15:~ }| |{11:[No Name] [+] }| |*26: xxx | |27: xxx | |28: xxx | |29: xxx | |30: xxx | | | |{10:term }| |:%s/foo/ZZZ^ | Actual: |foo bar baz | |bar baz fox | |bar foo baz | |{15:~ }| |{15:~ }| |{15:~ }| |{11:[No Name] [+] }| |*107: xxx | |108: xxx | |109: xxx | |110: xxx | |111: xxx | | | |{10:term }| |:%s/foo/ZZZ^ |
* 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.
* paste: use nvim_put()Justin M. Keyes2019-08-27
|
* paste: WIP #4448Justin M. Keyes2019-08-27
|
* tests: screen: notification_cb: improve assertion messageDaniel Hahler2019-08-20
|
* test/functional/ui/mode_spec: improve "ui mode_change event" (#10816)Daniel Hahler2019-08-20
| | | | Set a shorter `&matchtime` (instead of asserting the default), and do not sleep - `screen:expect` will do that (wait for it).
* test: win: enable output_spec testJan Edmund Lazo2019-08-18
|
* ui: transmit "blend=" property of highlight attributesBjörn Linse2019-08-18
|
* test/ui: properly test win_hide by explicitly marking hidden gridsBjörn Linse2019-08-17
|
* ui: use Window type in win_pos consistently with win_float_posBjörn Linse2019-08-17
| | | | Also check invalid positional arguments to screen:expect()
* keymap: allow modifiers to multibyte chars, like <m-ä>Björn Linse2019-08-16
|
* api: nvim_win_open() style="minimal" should disable 'foldcolumn'Björn Linse2019-08-14
|
* ex_getln.c: fix compute_cmdrow() not resetting lines_left (#10749)Ghjuvan Lacambre2019-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, when `inccomand` was set to `nosplit`, multi-line substitutions collapsed the command-line. This happened because when ex_getln.c:cursorcmd() computed a msg_row, it was given a cmdline_row one line too high. This happened because message.c:msg_puts_display() was supposed to decrement cmdline_row but didn't, because of the `msg_no_more && lines_left == 0` check placed just before the decrementation part in msg_puts_display's while loop. Every time msg_puts_display writes a line, it decreases `lines_left` (a variable used to know how many lines are left for prompts). Since redrawcommandline() did not reset `lines_left` between calls to msg_puts_display, every time a character was pressed, `lines_left` was decremented. This meant that once the user pressed COLUMNS+ROWS numbers of characters, `lines_left` would reach 0 and prevent msg_row from being decremented. It makes sense to fix setting `lines_left` to `cmdline_row` in `compute_cmdrow` ; after all, computing where the command line row should be placed is equivalent to computing how many `lines_left` of output there are left. Closes #8254.
* Merge #10098 'win: fix msg_puts_printf()'Justin M. Keyes2019-08-12
|\
| * Change to not test msg_puts_pirntf() in unix CIerw72019-06-09
| |
| * Add msg_puts_printf() test for multibyte characterserw72019-06-09
| |
* | test/cmdline_spec: adjust "no-op"Justin M. Keyes2019-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (<Cmd>0<cr> is not really a no-op, it moves the cursor.) Attempt to avoid flaky test: test/functional/ui/cmdline_spec.lua @ 830 Failure message: ./test/functional/ui/screen.lua:579: Row 2 did not match. Expected: | | |*{1:~ }| |{3: }| |:012345678901234567890123| |456789^ | Actual: | | |*{3: }| |:012345678901234567890123| |:012345678901234567890123| |456789^ | ./test/functional/ui/screen.lua:579: in function '_wait' ./test/functional/ui/screen.lua:367: in function 'expect' test/functional/ui/cmdline_spec.lua:841: in function <test/functional/ui/cmdline_spec.lua:830> ref https://github.com/neovim/neovim/pull/10171#issuecomment-520134344 ref #10171
* | 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
| |
* | vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusingJan Edmund Lazo2019-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163) https://github.com/vim/vim/commit/a84a3dd6635fcd2e07f510cba6a999585dcc381a vim-patch:8.1.1052: test for CTRL-C message sometimes fails Problem: test for CTRL-C message sometimes fails Solution: Make sure there are no changed buffers. https://github.com/vim/vim/commit/553e5a5c568e7d175b65b0472cd6d9843b25f4c8 vim-patch:8.1.1053: warning for missing return statement Problem: Warning for missing return statement. (Dominique Pelle) Solution: Add return statement. https://github.com/vim/vim/commit/d6c3f1fa2b5e1dd7dc87cf608d72b84ad696b58f
* | tests: fix/improve Screen:expect_unchanged (#10577)Daniel Hahler2019-07-24
| | | | | | | | | | | | Do not sleep before collecting initial state. Ref: https://github.com/neovim/neovim/pull/10550#issuecomment-513670205
* | tests: re-enable "tab drag in tabline to the left moves tab left" (#10588)Daniel Hahler2019-07-24
| | | | | | Ref: https://github.com/neovim/neovim/pull/4874
* | test: shell-test.c: "REP" command: flush, wait 1ms #10552Justin M. Keyes2019-07-20
| | | | | | | | | | | | Typically most shell output is the result of non-trivial work, so it would not blast stdout instantaneously. To more closely simulate that typical scenario, change `shell-test REP` to wait 1 millisecond between iterations.
* | screen.lua: always print keyword-args snapshotJustin M. Keyes2019-07-20
| |
* | screen.lua: expect_unchanged(), get_snapshot()Justin M. Keyes2019-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor `get_snapshot()` out of `print_snapshot()`, so that callers can get a table (for use with `expect()`) instead of the string form. Try to use this to fix indeterminism in `searchhl_spec.lua`. - Since the screen state is collected by `screen:expect_unchanged()`, we don't need a deterministic initial state (which would then be hardcoded into the test). This allows us to check "did anything change in the last N ms?" rather than "did anything change compared to a hardcoded screen-state?" - This may end up fruitless, because `expect_unchanged()` depends on timing to wait for an initial "current state".
* | Merge pull request #10504 from bfredl/hl_defBjörn Linse2019-07-16
|\ \ | | | | | | highlight: expose builtin highlight groups using hl_group_set event
| * | highlight: expose builtin highlight groups using hl_group_set eventBjörn Linse2019-07-14
| | |
* | | Merge pull request #10497 from bfredl/synlistBjörn Linse2019-07-14
|\ \ \ | |/ / |/| | messages: fix missing newlines in execute("syn list").
| * | syntax: fix missing newlines in execute("syn list"). fixes #10467Björn Linse2019-07-14
| | |
* | | floats: fix 'winblend' on top of doublewidth chars.Björn Linse2019-07-13
|/ / | | | | | | | | | | | | | | | | The interaction between 'winblend' and doublewidth chars in the background does not look very good. But check no chars get incorrectly placed at least. Also check that hidden EndOfBuffer region (from style="minimal") blends correctly.
* | tests: use vim.inspect (#10485)Daniel Hahler2019-07-13
| | | | | | | | | | | | | | The inspect modules is vendored as `vim.inspect`, and therefore it makes sense to use this in tests also. Ref: https://github.com/neovim/neovim/issues/6580 Ref: https://github.com/neovim/neovim/commit/bb3aa824b
* | Merge pull request #9575 from bfredl/redrawdebugBjörn Linse2019-07-09
|\ \ | | | | | | ui: implement better redrawdebug for the compositor
| * | ui: add 'redrawdebug' option for flexible debugging of redrawingBjörn Linse2019-07-09
| | |