aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* tests: use runtime from build for doc/tags with :help (#10479)Daniel Hahler2019-08-28
| | | | | | | | | | | | This is better practice in general, and allows to remove the "helptags ALL" hacks. Ref: https://github.com/neovim/neovim/issues/8824 Ref: https://github.com/neovim/neovim/commit/f1b67c3453c * Makefile: fix dependencies with regard to helptags - use the file as the main target to avoid unnecessary triggering - use "make oldtest" on Travis to ensure it gets built
* API: TRY_WRAP() for "abort-causing non-exception errors"Justin M. Keyes2019-08-28
| | | | | | | | - Introduce TRY_WRAP() until we have an *architectural* solution. - TODO: bfredl idea: prepare error-handling at "top level" (nv_event). - nvim_paste(): Revert luaeval() hack (see parent commit). - With TRY_WRAP() in nvim_put(), 'nomodifiable' error now correctly "bubbles up".
* paste: handle 'nomodifiable'Justin M. Keyes2019-08-27
| | | | | | | | - nvim_paste(): Marshal through luaeval() instead of nvim_execute_lua() because the latter seems to hide some errors. - Handle 'nomodifiable' in `nvim_put()` explicitly. - Require explicit `false` from `vim.paste()` in order to "cancel", otherwise assume true ("continue").
* paste: make vim.paste() "public"Justin M. Keyes2019-08-27
|
* paste: handle vim.paste() failureJustin M. Keyes2019-08-27
| | | | | | | | - Show error only once per "paste stream". - Drain remaining chunks until phase=3. - Lay groundwork for "cancel". - Constrain semantics of "cancel" to mean "client must stop"; it is unrelated to presence of error(s).
* paste: implement redo (AKA dot-repeat)Justin M. Keyes2019-08-27
| | | | | | - Normal-mode redo idiom(?): prepend "i" and append ESC. - Insert-mode only needs AppendToRedobuffLit(). - Cmdline-mode: only paste the first line.
* paste: insert text "before" cursor in Insert-modeJustin M. Keyes2019-08-27
|
* API: nvim_pasteJustin M. Keyes2019-08-27
|
* paste: workaround typeahead raceJustin M. Keyes2019-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workaround this failure: [ ERROR ] test/functional/terminal/tui_spec.lua @ 192: TUI paste: exactly 64 bytes test/functional/helpers.lua:403: retry() attempts: 478 test/functional/terminal/tui_spec.lua:201: Expected objects to be the same. Passed in: (table: 0x47cd77e8) { *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz endz' } Expected: (table: 0x47cd7830) { *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' } This happens because `curwin->w_cursor.col` is sometimes decremented at the end of `do_put`... because the editor is in Normal-mode instead of the expected Insert-mode. Caused by "typeahead race" (#10826): there may be queued input in the main thread not yet processed, thus the editor mode (`State` global) will be "wrong" during paste. Example: input "i" followed immediately by a paste sequence: i<start-paste>...<stop-paste> ^ "i" does not get processed in time, so the editor is in Normal-mode instead of Insert-mode while handling the paste. Attempted workarounds: - vim.api.nvim_feedkeys('','x',false) in vim._paste() - exec_normal() in tinput_wait_enqueue() - LOOP_PROCESS_EVENTS(&main_loop,…,0) in tinput_wait_enqueue() ref #10826
* API: nvim_put: "follow" parameterJustin M. Keyes2019-08-27
|
* API: nvim_put: always PUT_CURSENDJustin M. Keyes2019-08-27
| | | | | | | | | Fixes strange behavior where sometimes the buffer contents of a series of paste chunks (vim._paste) would be out-of-order. Now the tui_spec.lua screen-tests are much more reliable. But they still sometimes fail because of off-by-one cursor (caused by "typeahead race" resulting in wrong mode; fixed later in this patch-series).
* test/tui_spec: connect to child sessionJustin M. Keyes2019-08-27
|
* paste: edge-case: handle EOL at end-of-bufferJustin M. Keyes2019-08-27
| | | | This is "readfile()-style", see also ":help channel-lines".
* paste: testJustin M. Keyes2019-08-27
|
* paste: use nvim_put()Justin M. Keyes2019-08-27
|
* API: nvim_put #6819Justin M. Keyes2019-08-27
|
* paste: fixup testsJustin M. Keyes2019-08-27
|
* TUI/paste: always flush on paste mode-changeJustin M. Keyes2019-08-27
| | | | | | Flush input before entering, not only when leaving, paste mode. Else there could be pending input which will erroneously be sent to the paste handler.
* paste: WIP #4448Justin M. Keyes2019-08-27
|
* timer_spec: shorter timeout with "doesn't mess up the cmdline" (#10769)Daniel Hahler2019-08-26
| | | | | It was increased in dd21cd2a4 to avoid flakiness, but takes 1s then always. This specifies a shorter timeout again, uisng `load_adjust`.
* findoption_len: treat viminfo/viminfofile as aliasesDaniel Hahler2019-08-26
| | | | Ref: https://github.com/neovim/neovim/pull/10672#issuecomment-524716824
* teardown: fix win_free_all() heap-use-after-free #10839Abdelhakeem Osama2019-08-25
| | | Fixes #10838
* API: fix nvim_command_output buffer overflow (#10830)Abdelhakeem Osama2019-08-22
| | | Fixes https://github.com/neovim/neovim/issues/10829.
* vim-patch:8.1.0888: the a: dict is not immutable as documented (#10819)Abdelhakeem Osama2019-08-21
| | | | | | Problem: The a: dict is not immutable as documented. Solution: Make the a:dict immutable, add a test. (Ozaki Kiichi, Yasuhiro Matsumoto, closes vim/vim#3929) https://github.com/vim/vim/commit/31b816042fca879b11965ddd75287732563ba698
* Merge pull request #10821 from blueyed/asanDaniel Hahler2019-08-21
|\ | | | | tests: improve escaping of special chars, forward all sanitizer options
| * test/functional/helpers.lua: env: forward also TSAN_OPTIONS/MSAN_OPTIONSDaniel Hahler2019-08-21
| |
* | tests: support msg with global_helpers.ok (#10820)Daniel Hahler2019-08-21
|/ | | | | | Ref: https://github.com/neovim/neovim/pull/10768#discussion_r315904175 Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
* Merge pull request #10768 from blueyed/tests-shorter-timersDaniel Hahler2019-08-20
|\ | | | | tests: timer_spec: lower timeout, avoids flakiness
| * tests: screen: notification_cb: improve assertion messageDaniel Hahler2019-08-20
| |
| * tests: timer_spec: lower timeout, avoids flakinessDaniel Hahler2019-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by quickbuild failure, where `g:val` was increased already: 20:07:04,227 INFO - not ok 1164 - timers works with repeat two 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua @ 36 20:07:04,227 INFO - # Failure message: test/functional/eval/timer_spec.lua:38: Expected objects to be the same. 20:07:04,227 INFO - # Passed in: 20:07:04,227 INFO - # (number) 1 20:07:04,227 INFO - # Expected: 20:07:04,227 INFO - # (number) 0 20:07:04,227 INFO - # stack traceback: 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua:38: in function <test/functional/eval/timer_spec.lua:36> Uses a pattern of `eq()`ing `timer_start` and `g:val` in the same `eval` call, and decreases timeouts in general. Improves runtime from ~5s to <2s.
* | Merge pull request #10818 from blueyed/minorDaniel Hahler2019-08-20
|\ \ | | | | | | Minor: .gitignore, improve test assertion message
| * | tests: screen: notification_cb: improve assertion messageDaniel Hahler2019-08-20
| | |
* | | win: stream: reset tty stream on closeAnciety2019-08-20
|/ / | | | | | | | | | | | | | | | | | | This was overlooked in 8072f085d2ed. Analogous to 8a782f1699e2. fix #10668 ref 8072f085d2ed #9884 ref 8a782f1699e2 #2377
* / 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).
* tests: win: enable buffer focus testJan Edmund Lazo2019-08-18
|
* test: win: enable WinEnter terminal testJan Edmund Lazo2019-08-18
|
* 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
|
* Change to output status on failureerw72019-08-16
|
* windows: ok(#children >= 3 and #chidlen <= 5)erw72019-08-16
| | | | | Depending on the version of Windows, conhost.exe may not be included in the child process.
* windows: ok(#children >= 4 and #children <= 5)Daniel Hahler2019-08-16
|
* tests: skip "API nvim_parse_expression" on MSVC_32 (#10773)Daniel Hahler2019-08-14
| | | | | | Only "API nvim_parse_expression works with &opt" is flaky, but easier to skip all of "API nvim_parse_expression". Ref: https://github.com/neovim/neovim/issues/10241
* Merge pull request #10774 from bfredl/miminal_fdcBjörn Linse2019-08-14
|\ | | | | api: nvim_win_open() style="minimal" should disable 'foldcolumn'
| * api: nvim_win_open() style="minimal" should disable 'foldcolumn'Björn Linse2019-08-14
| |
* | pyxversion: fix logic error #10759Björn Linse2019-08-14
|/ | | | Do not incorrectly prefer python2 if python3 is working. fixes #10758
* tests: fix/improve "jobwait returns -1 when timed out" #10767Daniel Hahler2019-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a longer timeout for Windows already, but unlike stated in 51d42917f it is not a worst-case, but gets waited for always. The test is only about "-1" on timeout, so reduce it to this. Fixes: 16:33:19,309 INFO - not ok 627 - jobs jobwait with timeout argument will return -1 if the wait timed out 16:33:19,309 INFO - # test/functional/core/job_spec.lua @ 707 16:33:19,309 INFO - # Failure message: test/functional/core/job_spec.lua:714: Expected objects to be the same. 16:33:19,309 INFO - # Passed in: 16:33:19,309 INFO - # (table: 0x0db1a3f0) { 16:33:19,309 INFO - # [1] = 'notification' 16:33:19,309 INFO - # [2] = 'wait' 16:33:19,309 INFO - # *[3] = { 16:33:19,309 INFO - # *[1] = { 16:33:19,309 INFO - # *[1] = -1 16:33:19,309 INFO - # [2] = -1 } } } 16:33:19,309 INFO - # Expected: 16:33:19,309 INFO - # (table: 0x0db1a480) { 16:33:19,309 INFO - # [1] = 'notification' 16:33:19,309 INFO - # [2] = 'wait' 16:33:19,309 INFO - # *[3] = { 16:33:19,309 INFO - # *[1] = { 16:33:19,309 INFO - # *[1] = 4 16:33:19,309 INFO - # [2] = -1 } } } 16:33:19,309 INFO - # stack traceback: 16:33:19,309 INFO - # test/functional/core/job_spec.lua:714: in function <test/functional/core/job_spec.lua:707>
* tests: use larger timeout with "timers can be stopped from the handler" (#10760)Daniel Hahler2019-08-14
| | | | | | | | | | | | | | | | Seen on quickbuild: 23:01:01,289 INFO - not ok 1172 - timers can be stopped from the handler 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua @ 154 23:01:01,289 INFO - # Failure message: test/functional/eval/timer_spec.lua:166: Expected objects to be the same. 23:01:01,289 INFO - # Passed in: 23:01:01,289 INFO - # (number) 3 23:01:01,289 INFO - # Expected: 23:01:01,289 INFO - # (number) 0 23:01:01,289 INFO - # stack traceback: 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua:166: in function <test/functional/eval/timer_spec.lua:154> Log: http://neovim-qb.szakmeister.net/build/24288 Ref: https://github.com/neovim/neovim/pull/10364