aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
| * test: add tests for pager glitches and crashesBjörn Linse2019-09-06
| |
* | tests: do_rmdir(): improve error handling #10955Daniel Hahler2019-09-06
|/
* Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'Justin M. Keyes2019-09-05
|\
| * Change test because maparg was changed to also return lnumerw72019-09-04
| |
* | 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>
* | | test/shada_spec: avoid exit_event race #10951Justin M. Keyes2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Doing clear() multiple times in quick succession provokes the `exit_event` race described in #8813. - Avoid it by removing unnecessary reset() call. - Replace unnecessary nested describe() blocks with it() blocks. ref d4a0b6c4e1d7
* | | anchor float to buffer positionBjörn Linse2019-09-04
|/ / | | | | | | vim-patch:8.1.1645: cannot use a popup window for a balloon
* | tests: scrollback_spec: use shell-test instead of awk (#10914)Daniel Hahler2019-09-04
| | | | | | | | Ref: #10804 Ref: b64af88
* | test/mode_spec: increase 'matchtime' to fix flakyJustin M. Keyes2019-09-04
| | | | | | | | | | fix #10941 regressed by 7ed212262242
* | test: is_os() #10933Justin M. Keyes2019-09-04
| | | | | | | | | | - Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
* | 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: enable "exit event follows stdout, stderr" [ci skip] #10929Justin M. Keyes2019-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update the test to work with changes since it was originally written. - Keep the test pending() because it still fails: Expected objects to be the same. Passed in: (table: 0x50ce9e38) { [1] = { [1] = 'notification' [2] = 'stderr' [3] = { [1] = 0 [2] = { [1] = '' } } } *[2] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { *[1] = '' } } } [3] = { [1] = 'notification' [2] = 'exit' [3] = { [1] = 0 [2] = 143 } } } Expected: (table: 0x50ce9870) { [1] = { [1] = 'notification' [2] = 'stderr' [3] = { [1] = 0 [2] = { [1] = '' } } } *[2] = { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { *[1] = 'abcdef' } } } [3] = { [1] = 'notification' [2] = 'stdout' [3] = { [1] = 0 [2] = { [1] = '' } } } }
* | shada/context: fully remove jumplist duplicates #10898Abdelhakeem Osama2019-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
* | jobwait(): fix race if job exits before waiting on itJustin M. Keyes2019-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If a job exits while waiting on another job, the on_exit handler is queued but f_jobwait() skips it. Solution: Always do process_wait(), so that handlers are run during f_jobwait(). fix #8302 Test case: $ BUSTED_ARGS="--repeat=2000 --no-keep-going" TEST_FILE=test/functional/core/job_spec.lua TEST_FILTER=waiting make functionaltest Failure example (macOS CI): FAILED test/functional/core/job_spec.lua: jobs jobwait will run callbacks while waiting test/functional/core/job_spec.lua:606: Expected objects to be the same. Passed in: (table: 0x1be77c80) { [1] = 'notification' [2] = 'wait' *[3] = { *[1] = 3 } } Expected: (table: 0x1be77d10) { [1] = 'notification' [2] = 'wait' *[3] = { *[1] = 4 } } stack traceback: test/functional/core/job_spec.lua:606: in function <test/functional/core/job_spec.lua:583
* | 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>
* | test/job_spec: improve visibility of flaky testJustin M. Keyes2019-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test sometimes fails on macOS CI: FAILED test/functional/core/job_spec.lua: jobs jobwait will run callbacks while waiting test/functional/core/job_spec.lua:606: Expected objects to be the same. Passed in: (table: 0x1be77c80) { [1] = 'notification' [2] = 'wait' *[3] = { *[1] = 3 } } Expected: (table: 0x1be77d10) { [1] = 'notification' [2] = 'wait' *[3] = { *[1] = 4 } } stack traceback: test/functional/core/job_spec.lua:606: in function <test/functional/core/job_spec.lua:583 Change the test to check if all jobs are starting, not only exiting.
* | tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler2019-09-03
|/ | | | | | luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
* Merge pull request #10920 from bfredl/asyncfailBjörn Linse2019-09-02
|\ | | | | api: make try_end clean-up after an exception properly.
| * api: make try_end clean-up after an exception properly. Fixes #10809Björn Linse2019-09-02
| | | | | | | | | | | | Otherwise `force_abort` will cause an emsg() higher on the stack to be converted to an exception, even though it is outside any try/catch.
* | 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.
* Merge #10804 'CI/OpenBSD: functional tests'Justin M. Keyes2019-09-01
|\
| * test/uname(): always lowercaseJustin M. Keyes2019-09-01
| |
| * test/OpenBSD: skip some testsJustin M. Keyes2019-09-01
| | | | | | | | Temporary workaround to unblock CI for OpenBSD.
| * test: shell-test.c: flush all streamsJustin M. Keyes2019-09-01
| |
| * 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
| * test: "can have two timers": retry()Justin M. Keyes2019-09-01
| | | | | | | | ref #10768
| * CI/OpenBSD: run functional testsEdd Barrett2019-09-01
| | | | | | | | | | | | | | | | | | | | | | Adapt some tests for OpenBSD: - scrollback_spec: - seq(1) is not available on OpenBSD: we'd use jot(1). - Instead use a (hopefully) portable awk(1) snippet. - channels_spec - job_spec - tui_spec
* | API: nvim_buf_set_lines: handle 'nomodifiable' #10910Justin M. Keyes2019-09-01
|/
* API: make nvim_win_set_option() set window-global, not buffer-local #9110Björn Linse2019-09-01
| | | | | | NB: the `!(flags & SOPT_GLOBAL)` exception is for 'statusline'. Because `:set statusline=...` sets the global value for _all_ windows, `:setlocal` is the best we can do there. This is a one-of-a-kind option that doesn't work like any other option.
* paste: one undo-block per streamJustin M. Keyes2019-09-02
| | | | | | - All "chunks" in a paste-stream should form a single undo-block. Side effect of 7a8579288424 was to create an undo-block for each chunk. - Also: remove old :redraw force logic, irrelevant after 7a8579288424.
* fixup! eval: add wait() testAbdelhakeem2019-09-01
|
* eval: add wait() testAbdelhakeem2019-09-01
|
* 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: assert_alive()Justin M. Keyes2019-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^ |
* api: make nvim_put support "\022{NUM}" regtype as returned by getregtype()Björn Linse2019-08-31
|
* tui/input: defer nvim_paste properly.Björn Linse2019-08-31
| | | | | | | | | Otherwise cursor and redraw code for normal and insert mode will not run. The "tickle" workaround was used for this instead, and can now be removed. The builtin vim.lua got the name [string "-- Nvim-Lua stdlib: thevimmodule (:help l..."] in error messages. Fix it to something reasonable.
* test: vim.paste() cancelJustin M. Keyes2019-08-30
|
* API: nvim_paste: add `crlf` parameterJustin M. Keyes2019-08-30
|
* tests: check_logs: improve error message (#10887)Daniel Hahler2019-08-30
| | | | | | | | | Before: [ ERROR ] test/functional/helpers.lua @ 812: after_each test/helpers.lua:156: assertion failed! stack traceback: test/helpers.lua:156: in function 'check_logs' test/functional/helpers.lua:816: in function <test/functional/helpers.lua:812>
* 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: break lines at CR, CRLF #10877Justin M. Keyes2019-08-29
| | | | | | Some terminals helpfully translate \n to \r. fix #10872 ref #10223
* Fix test/busted/outputHandlers/TAP.lua (#10881)Daniel Hahler2019-08-29
| | | | | | Extending the original TAP handler was not working as expected. This adds a new function for displaying the log. Ref: https://github.com/neovim/neovim/pull/10876