aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval
Commit message (Collapse)AuthorAge
* Use uv_os_homedir and current directory as backup when $HOME is not set (#13657)ffanzhang2021-01-10
| | | | | | Close https://github.com/neovim/neovim/issues/8614 Use uv_os_homedir and current directory as backup if HOME env is not set. Allocate homedir only if var is not NULL.
* Revert "vim-patch:8.1.0822: peeking and flushing output slows down execution"Jan Edmund Lazo2020-12-31
| | | | This reverts commit 0519a75f6eca1065a4d0184f99c71ae03a99b9b1.
* vim-patch:8.1.0822: peeking and flushing output slows down executionJan Edmund Lazo2020-12-25
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* test: textlock api errornotomo2020-12-16
|
* test/functional/eval: assert that executable() fixtures are executableJan Edmund Lazo2020-12-11
|
* eval: executable(), exepath() accept strings onlyJan Edmund Lazo2020-12-11
| | | | | | | | Cherry-pick f_executable(), f_exepath(), check_for_string() from patch 8.2.2117. Rename check_for_string() to tv_check_for_string(). https://github.com/vim/vim/commit/7bb4e74c38642682cfdd0cb4052adfa5efdd7dd1 Close https://github.com/neovim/neovim/issues/13485
* vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)Jan Edmund Lazo2020-12-11
| | | | | Problem: Cannot skip tests for specific MS-Windows platform. Solution: Add windowsversion(). https://github.com/vim/vim/commit/0c1e3744ff0cd6c17af773046b876b428ff3dded
* test/timer_spec: increase base timeoutJan Edmund Lazo2020-12-01
| | | | | | | | | | | | | The following keeps happening in my local environment because the timeout is too short. [ FAILED ] test/functional/eval/timer_spec.lua @ 208: timers do not crash when processing events in the handler test/functional/eval/timer_spec.lua:219: retry() attempts: 1 test/helpers.lua:73: Expected objects to be the same. Passed in: (number) 0 Expected: (number) 1
* feat(lua): improve error message to make it actionable (#13276)Alvaro Muñoz2020-11-13
| | | * improve error message to make it actionable
* vim-patch:8.2.1925: list/dict test failsJan Edmund Lazo2020-11-01
| | | | | | | | | | | | | | | | | | | | | | Problem: List/dict test fails. Solution: Correct expected exception. https://github.com/vim/vim/commit/6d967125ad87b1c2a9467357286c3514d5dd1c40 Cherry-pick e_dictkey[] change from patch 8.2.1924. N/A patches for version.c: vim-patch:8.2.1929: MS-Windows: problem loading Perl 5.32 Problem: MS-Windows: problem loading Perl 5.32. Solution: Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes vim/vim#7234) https://github.com/vim/vim/commit/0289065e41ce3148f929e16a55aa3b161c80576f vim-patch:8.2.1932: compiler warnings when building with Athena GUI Problem: Compiler warnings when building with Athena GUI. Solution: Fix function signatures. https://github.com/vim/vim/commit/963734e316bd17dd7290abcac28b875435d06381
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* vim-patch:8.2.0539: comparing two NULL list failsJan Edmund Lazo2020-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Comparing two NULL list fails. Solution: Change the order of comparing two lists. https://github.com/vim/vim/commit/7b293c730b07d1586688e622b8d9cbbb4a52379b N/A patches for version.c: vim-patch:8.2.1187: terminal2 test sometimes hangs in the GUI on Travis Problem: Terminal2 test sometimes hangs in the GUI on Travis. Solution: Disable Test_zz2_terminal_guioptions_bang() for now. https://github.com/vim/vim/commit/c85156bb897085d7f5a8e4e180287f87bf19b948 vim-patch:8.2.1188: memory leak with invalid json input Problem: Memory leak with invalid json input. Solution: Free all keys at the end. (Dominique Pellé, closes vim/vim#6443, closes vim/vim#6442) https://github.com/vim/vim/commit/6d3a7213f58da834b0fc869d05f87e86010c66cf vim-patch:8.2.1196: build failure with normal features Problem: Build failure with normal features. Solution: Add #ifdef. https://github.com/vim/vim/commit/83e7450053399942e1c9efa802c568b51d948541 vim-patch:8.2.1198: terminal2 test sometimes hangs in the GUI on Travis Problem: Terminal2 test sometimes hangs in the GUI on Travis. Solution: Move test function to terminal3 to see if the problem moves too. https://github.com/vim/vim/commit/a4b442614c5ca4ebf32acf5cf0b7b718496f1c94
* Merge pull request #12455 from janlazo/vim-8.0.1554Matthieu Coudron2020-06-22
|\ | | | | [RDY]vim-patch:8.0.1554,8.1.1977,8.2.{927,930,932,938,954,963,964,966,980,983,998,999}
| * vim-patch:8.2.0966: 'shortmess' flag "n" not used in two placesJan Edmund Lazo2020-06-18
| | | | | | | | | | | | | | Problem: 'shortmess' flag "n" not used in two places. Solution: Make use of the "n" flag consistent. (Nick Jensen, closes vim/vim#6245, closes vim/vim#6244) https://github.com/vim/vim/commit/722e505d1a55dfde5ab62241d10da91d2e10c3c1
* | eval: fix assertion failure in garbage collection (#12436)erw72020-06-22
|/ | | | | | | | | | | | | | | | | | | | | | | * eval: fix assertion failure in garbage collection fixes #12387, #12430 Lists with CopyID+1 linked only from previous_funccal may be removed in the garbage collection. Therefore, the terms of the assertions are not correct. This can be confirmed by the following (The l:x with CopyID+1 of the first function call needs to be removed by garbage collection): func! s:f() let l:x = [1] let g:x = l: endfunc for _ in range(2) call s:f() endfor call garbagecollect() " press any key * test: add test for #12387, #12430
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* vim-patch:8.2.0491: cannot recognize a <script> mapping using maparg()Jan Edmund Lazo2020-06-04
| | | | | | Problem: Cannot recognize a <script> mapping using maparg(). Solution: Add the "script" key. (closes vim/vim#5873) https://github.com/vim/vim/commit/2da0f0c445da3c9b35b2a0cd595d10e81ad2a6f9
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* API: include invalid buffer/window/tabpage in error message (#11712)Daniel Hahler2020-01-14
|
* system(), jobstart(): raise error on non-executable #11234Daniel Hahler2019-12-24
| | | | | | | | | | * tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
* tests: let_spec: enable "multibyte env var to child process" (#11233)Daniel Hahler2019-10-18
|
* 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.
* 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.
* tests: retry: "wait() evaluates the condition on given interval" (#11155)Daniel Hahler2019-10-06
| | | Ref: https://github.com/neovim/neovim/issues/11137
* Revert "win/os_env_exists(): workaround libuv bug #10734"Daniel Hahler2019-09-25
| | | | This reverts commit 278c5d452c2cbc436a9cc317407ae6021a226c3a.
* 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:~ }| |^ |
* Context: rename "buflist" => "bufs"Justin M. Keyes2019-09-14
| | | | | Given the other type names "jumps", "vars", etc., the name "buflist" is somewhat unintuitive.
* tests: fix system_spec when run with clipboard manager (#10956)Daniel Hahler2019-09-12
| | | | | | | | | * tests: move os_kill to functional helpers * tests: fix system_spec when run with clipboard manager Replaces "xclip" with a dedicated helper program. Fixes: https://github.com/neovim/neovim/issues/4900#issuecomment-501866842
* eval: wait(): always spin up dummy-timer #10990Justin M. Keyes2019-09-11
| | | | This avoids getting "stuck". If user actually _wants_ to get stuck forever, they could use `:sleep` or specify a really big `interval`.
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
* Change test because maparg was changed to also return lnumerw72019-09-04
|
* 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.
* test: "can have two timers": retry()Justin M. Keyes2019-09-01
| | | | ref #10768
* 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.
* fixup! eval: add wait() testAbdelhakeem2019-09-01
|
* eval: add wait() testAbdelhakeem2019-09-01
|
* test/ui: update tests for new msg_grid implementationBjörn Linse2019-09-01
|
* 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`.
* 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>
* 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.
* 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
* win/os_env_exists(): workaround libuv bug #10734Justin M. Keyes2019-08-10
| | | | | | | | | | os_env_exists() fails on MSVC build: os_env_exists:104: uv_os_getenv(EMPTY_VAR) failed: -4094 UNKNOWN - Revert 396a3945c4eba733b3a99a7ded217af83a400791 - HACK: Windows: return TRUE if uv_os_getenv() returns UV_UNKNOWN, until libuv bug is fixed: https://github.com/libuv/libuv/issues/2413 ref https://github.com/neovim/neovim/commit/396a3945c4eba733b3a99a7ded217af83a400791#r34642361
* test/environ_spec: Windows treats empty as undefinedJustin M. Keyes2019-08-10
| | | | ref #10657
* exists(): return false for empty env var #10657Daniel Hahler2019-08-09
| | | | | Fixes https://github.com/neovim/neovim/issues/3266 close #10657
* f_environ: cleanup/refactorDaniel Hahler2019-08-06
| | | | | - use os_getenvname_at_index / os_getenv - f_getenv: empty (*p == NUL) is not null (undefined)
* 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
* API: Context: save/restoreAbdelhakeem2019-07-27
|
* eval: context: add ctx-family functionsAbdelhakeem2019-07-27
|