aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
* build/doc/CI: remove/update quickbuild references #11258Justin M. Keyes2019-10-19
|
* ex_echo: fix check for got_int #11225Daniel Hahler2019-10-19
| | | | | | It needs to return to not output any remaining parts. Followup to https://github.com/neovim/neovim/pull/10926 Ref: https://github.com/neovim/neovim/issues/10923
* test/functional: retry/Screen: failure instead of error #11173Daniel Hahler2019-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Running out of retries, or unexpected screen state should make the test FAIL, not ERROR. - Uses levels to report the location of the caller. - Improve message with retry-failure (formatting). Before: [ RUN ] test: 103.53 ms ERR test/functional/helpers.lua:388: retry() attempts: 1 test/functional/ui/screen.lua:587: Row 1 did not match. Expected: |*X^ | |{0:~ }| |{0:~ }| | | Actual: |*^ | |{0:~ }| |{0:~ }| | | 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/helpers.lua:388: in function 'retry' test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23> After: [ RUN ] test: 105.22 ms FAIL test/functional/test_spec.lua:24: stopping after 1 retry() attempts. test/functional/test_spec.lua:25: Row 1 did not match. Expected: |*X^ | |{0:~ }| |{0:~ }| | | Actual: |*^ | |{0:~ }| |{0:~ }| | | 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/helpers.lua:389: in function 'retry' test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
* tests: let_spec: enable "multibyte env var to child process" (#11233)Daniel Hahler2019-10-18
|
* build: do not build test fixtures by default (#11230)Daniel Hahler2019-10-18
| | | | | - tty-test is also used on Windows - FUNCTIONALTEST_PREREQS: add printenv-test
* tests: fix non-controversial misuse of `pending` (#11247)Daniel Hahler2019-10-18
| | | Ref: https://github.com/neovim/neovim/pull/11184
* tests: tui_spec: fix waiting for terminal to be ready (#11232)Daniel Hahler2019-10-15
| | | | | The screen would have '-- TERMINAL --' already initially. Related to flakiness of "TUI FocusGained/FocusLost in terminal-mode".
* tests/ui: completely delete "attr_ignore" featureBjörn Linse2019-10-13
| | | | | All existing usages are ad-hoc/random/lazyness. Generating attribute specifications is not hard since four years, just do it always.
* 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/ui: cleanup illegitimate usages of "attr_ignore"Björn Linse2019-10-13
| | | | | "attr_ignore" is an anti-pattern, with snapshot_util() just include all the highlights already.
* tests/ui: make screen.lua use "linegrid" representation internallyBjörn Linse2019-10-13
| | | | | | | | | | PR #8221 took a short-cut when implementing the tests: screen.lua would translate the linegrid highlight ids back into the old per-cell attribute description. Apart from cleaning up technical debt, this enables to check both rgb and cterm colors in the same expect(), which previously was needlessly restricted to ext_hlstate tests only.
* fnamemodify: fix handling of :r after :e #11165Rob Pilling2019-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Test fnamemodify() - Test handling of `expand("%:e:e:r")`. - Fix :e:e:r on filenames with insufficiently many extensions During `fnamemodify()`, ensuring that we don't go before the filename's tail is insufficient in cases where we've already handled a ":e" modifier, for example: ``` "path/to/this.file.ext" :e:e:r:r ^ ^-------- *fnamep +------------- tail ``` This means for a ":r", we'll go before `*fnamep`, and outside the bounds of the filename. This is both incorrect and causes neovim to exit with an allocation error. We exit because we attempt to calculate `s - *fnamep` (line 23948). Since `s` is before `*fnamep`, we caluclate a negative length, which ends up being interpreted as an amount to allocate, causing neovim to exit with ENOMEM (`memory.c:xmalloc`). We must instead ensure we don't go before `*fnamep` nor `tail`. The check for `tail` is still relevant, for example: ``` "path/to/this.file.ext" :r:r:r ^ ^------------- tail +--------------------- *fnamep ``` Here we don't want to go before `tail`. close #11165
* 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.
* tests: retry: "wait() evaluates the condition on given interval" (#11155)Daniel Hahler2019-10-06
| | | Ref: https://github.com/neovim/neovim/issues/11137
* tests/functional: keep $TMPDIR in env (#11163)Daniel Hahler2019-10-06
|
* win_line: update `w_last_cursorline` alwaysDaniel Hahler2019-10-04
| | | | | | | | | | | | Vim patch 8.1.0856 (54d9ea6) caused a performance regression in Neovim, when `set conceallevel=1 nocursorline` was used, since then due to refactoring in 23c71d5 `w_last_cursorline` would never get updated anymore. Adds/uses `redrawdebug+=nodelta` for testing this. Fixes https://github.com/neovim/neovim/issues/11100. Closes https://github.com/neovim/neovim/pull/11101.
* tests: tui_spec: improve/merge OptionSet/deferredDaniel Hahler2019-10-04
| | | | Closes https://github.com/neovim/neovim/pull/11129.
* Merge #11087 from janlazo/vim-8.1.0010Justin M. Keyes2019-10-02
|\ | | | | vim-patch:8.1.{10,230,315,330,514,517,518,1327,1347,1758,2072,2074,2091,2095,2103}
| * test: fix screen assertionsJan Edmund Lazo2019-10-01
| |
* | Fix flaky test: tui_spec: increase timeout (#11134)Daniel Hahler2019-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meant to fix: [ ERROR ] test/functional/terminal/tui_spec.lua @ 925: TUI FocusGained/FocusLost in terminal-mode test/functional/ui/screen.lua:587: Row 6 did not match. Expected: |{1:r}eady $ | |[Process exited 0] | | | | | | | |*gained | |{3:-- TERMINAL --} | Actual: |{1:r}eady $ | |[Process exited 0] | | | | | | | |*:terminal | |{3:-- TERMINAL --} | 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/terminal/tui_spec.lua:934: in function <test/functional/terminal/tui_spec.lua:925> I've thought about adding this, but it might not be really relevant, and slows down the tests a bit (and a warning "warning: Screen test succeeded immediately" with another test): ```diff diff --git i/test/functional/terminal/tui_spec.lua w/test/functional/terminal/tui_spec.lua index ada073c4e..4bc2ab4e0 100644 --- i/test/functional/terminal/tui_spec.lua +++ w/test/functional/terminal/tui_spec.lua @@ -818,6 +818,11 @@ describe('TUI FocusGained/FocusLost', function() ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]') feed_data(":autocmd FocusGained * echo 'gained'\n") feed_data(":autocmd FocusLost * echo 'lost'\n") + -- Wait for autocommand to be registered. + retry(nil, nil, function() + feed_data(":autocmd FocusLost\n") + screen:expect{any=" echo 'lost'"} + end) feed_data("\034\016") -- CTRL-\ CTRL-N end) ```
* | Fix redraw regression with w_p_cole in visual modeDaniel Hahler2019-10-02
|/ | | | | Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51. Closes https://github.com/neovim/neovim/pull/11120.
* tui: improve handle_background_color: short-circuit (#11067)Daniel Hahler2019-09-30
| | | | | | | | * handle_background_color: short-circuit if handled already * Unit tests for handle_background_color * set waiting_for_bg_response to false in tui_terminal_after_startup By then it should have been received.
* screen: don't crash on invalid grid cells being recomposedBjörn Linse2019-09-30
|
* cmdline: wildmenumode() should be true with wildoptions+=pumBjörn Linse2019-09-28
|
* tree-sitter: improve and cleanup testsBjörn Linse2019-09-28
|
* tree-sitter: handle node equalityBjörn Linse2019-09-28
|
* tree-sitter: use "range" instead of "point_range" consistently in lua APIBjörn Linse2019-09-28
|
* tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests)Björn Linse2019-09-28
|
* tree-sitter: improve parser API (shared parser between plugins)Björn Linse2019-09-28
|
* tree-sitter: rename tree_sitter => treesitter for consistencyBjörn Linse2019-09-28
|
* tree-sitter: add basic testing on ciBjörn Linse2019-09-28
| | | | build tree-sitter c parser on ci for testing purposes
* Fix two more flaky tests (#11095)Daniel Hahler2019-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * mode_spec: retry with increasing matchtime `matchtime=2` might still be too low (with luacov on AppVeyor). [ ERROR ] test/functional\ui\mode_spec.lua @ 47: ui mode_change event works in insert mode test\functional\ui\screen.lua:587: mode Expected objects to be the same. Passed in: (string) 'insert' Expected: (string) 'showmatch' Hint: full state of "mode": "insert" Followup to fe60013fb. ref #10941 Initially regressed in 7ed212262242 `` * ui/screen_basic_spec: set timeoutlen=10000 This fixes the test on slow CI. Ref: https://ci.appveyor.com/project/neovim/neovim/builds/27600387/job/t468h2b3w9lwtlm5#L10930
* vim-patch:8.0.0914: highlight attributes are always combined (#10256)Daniel Hahler2019-09-26
| | | | | | | | | Problem: Highlight attributes are always combined. Solution: Add the 'nocombine' value to replace attributes instead of combining them. (scauligi, closes vim/vim#1963) https://github.com/vim/vim/commit/0cd2a94a4030f6bd12eaec44db92db108e33c913 Closes https://github.com/neovim/neovim/pull/10256.
* Merge pull request #10978 from blueyed/update-libuvDaniel Hahler2019-09-25
|\ | | | | third-party: update libuv to v1.32.0
| * test/functional/preload.lua: _set_fmode for WindowsDaniel Hahler2019-09-25
| |
| * Revert "win/os_env_exists(): workaround libuv bug #10734"Daniel Hahler2019-09-25
| | | | | | | | This reverts commit 278c5d452c2cbc436a9cc317407ae6021a226c3a.
* | paste: fix handling of "<" in cmdline (#11094)Daniel Hahler2019-09-25
|/ | | Fixes https://github.com/neovim/neovim/issues/11088.
* timer_spec: fix/harden flaky tests (#11080)Daniel Hahler2019-09-24
| | | | | | | | | | | | | | | | | | | | | | Those are flaky when using luacov (which causes reproducible slowness). E.g.: [ ERROR ] test/functional\eval\timer_spec.lua @ 105: timers can invoke redraw in blocking getchar() call test\functional\ui\screen.lua:587: Row 3 did not match. Expected: |ITEM 1 | |ITEM 2 | |*{1:~ }| |{1:~ }| |{1:~ }| |^ | Actual: |ITEM 1 | |ITEM 2 | |*ITEM 3 | |{1:~ }| |{1:~ }| |^ |
* tui_spec: improve "TUI paste: exactly 64 bytes" (#11086)Daniel Hahler2019-09-24
| | | | | | | | | | | | | | | | | | | | | | | Doing the screen test first might give insights about a possible (flaky?) failure, where it looks like "feed_data" is processed out of order: [ ERROR ] test/functional/terminal/tui_spec.lua @ 561: TUI paste: exactly 64 bytes #10311 test/functional/helpers.lua:388: retry() attempts: 490 test/functional/terminal/tui_spec.lua:66: Expected objects to be the same. Passed in: (table: 0x44042de8) { *[1] = ' endzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' } Expected: (table: 0x41d6e568) { *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' } stack traceback: test/functional/helpers.lua:388: in function 'retry' test/functional/terminal/tui_spec.lua:63: in function 'expect_child_buf_lines' test/functional/terminal/tui_spec.lua:569: in function <test/functional/terminal/tui_spec.lua:561> Ref: https://github.com/neovim/neovim/pull/11083#issuecomment-534375201 Build log: https://travis-ci.org/neovim/neovim/jobs/588749739#L5597
* tests: make 'win_update redraws lines properly' more readable (#11068)Daniel Hahler2019-09-22
|
* screen: missing redraw/highlight for ruler in message areaBjörn Linse2019-09-22
|
* Fix "precedes" listchar behavior in wrap modeZach Wegner2019-09-21
| | | | | | | | | | | | Previously, the "precedes" character would be rendered on every row when w_skipcol > 0 (i.e., when viewing a single line longer than the entire screen), instead of just on the first row. Make sure to only render it on the first row in this case. Add a test for this behavior. Fix documentation for the "precedes" character, which erroneously stated that it was only active when wrap mode was off.
* vim-patch:8.1.0460: assert_fails() message argument #11051Jan Edmund Lazo2019-09-21
| | | | | Problem: assert_fails() does not take a message argument Solution: Add the argument. https://github.com/vim/vim/commit/1307d1c003b01b4f67524c95feb07c3d91c7c428
* screen: fix vcol counting with virtual text. Fixes #9941Björn Linse2019-09-21
|
* win_update: fix redraw regression (#11027)Daniel Hahler2019-09-18
| | | | | | | Before 6e9ea5adc `win_ins_lines` would return `FAIL` for `i/line_count == 0`. Handle this by checking it in the outer `if`. Ref: https://github.com/neovim/neovim/commit/6e9ea5ad#commitcomment-35084669
* vim-patch:8.0.1770: assert functions don't return anythingJan Edmund Lazo2019-09-16
| | | | | | Problem: Assert functions don't return anything. Solution: Return non-zero when the assertion fails. https://github.com/vim/vim/commit/65a5464985f980d2bbbf4e14d39d416dce065ec7
* 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.
* server_requests_spec: fix assertion, pass Lua paths via args (#10875)Daniel Hahler2019-09-16
| | | | This makes it pick up the nvim Luarocks module properly when not installed via third-party.
* fix api_level_6.mpackJustin M. Keyes2019-09-15
| | | | | This was generated incorrectly in the 0.4.1 release, fixed in the 0.4.1 release.