aboutsummaryrefslogtreecommitdiff
path: root/test
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
|
* doc: Fix TEST_FILTER example #11158Vikram Pal2019-10-06
|
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* 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.
* tui: fix handling of bg response after suspend (#11145)Daniel Hahler2019-10-03
| | | | | | | | | | | | | | | | `tui_terminal_after_startup` gets called right after resuming from suspending (via `Ctrl-z`) already (not delayed as with the startup itself), and would set `waiting_for_bg_response` to false then directly. This results in the terminal response not being processed then anymore, and leaking into Neovim itself. This changes it to try 5 times always, which means that it typically would stop after a few characters of input from the user typically, e.g. with tmux, which does not send a reply. While it might be better to have something based on the time (e.g. only wait for max 1s), this appears to be easier to do. Fixes regression in 8a4ae3d.
* 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
| |
* | tests: unit: NVIM_TEST_TRACE_LEVEL: default to 0 #11144Daniel Hahler2019-10-02
| | | | | | | | Traces are not useful normally (unless debugging/fixing tests), but only add overhead. Disable them by default.
* | 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
* Merge pull request #10907 from jszakmeister/add-freebsd-sourcehut-supportJohn Szakmeister2019-09-26
|\ | | | | build: add support for building for FreeBSD under Sourcehut
| * build: add support for building for FreeBSD under Sourcehut [skip ci]John Szakmeister2019-09-25
| |
* | 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.
* tests: busted: nvim handler: display durations always (#11075)Daniel Hahler2019-09-25
| | | | This shows them also with test failures/errors, where it is useful to see how long the test took (for flaky failures running into timeout).
* 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
|
* tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)Daniel Hahler2019-09-22
|
* screen: missing redraw/highlight for ruler in message areaBjörn Linse2019-09-22
|