aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval
Commit message (Collapse)AuthorAge
* 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
|
* win: jobstart(), system(): $PATHEXT-resolve exeJustin M. Keyes2019-07-21
| | | | | | | | | | | | Windows: In order for jobstart(['foo']), system(['foo']) to find "foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to process_spawn(). Rationale: jobstart([…]), system([…]) "executable" semantics should be consistent with the VimL executable() function. fix #9569 related: #10554
* reltimefloat(): allow negative result #10544Justin M. Keyes2019-07-20
| | | | | | | | | For "backwards" duration, reltimefloat() should return negative value like its counterpart reltimestr(). ref bab24a88ab48 ref 06af88cd72ea ref #10521 fix #10452
* tests: fix "system() … prints verbose information" (#10532)Daniel Hahler2019-07-17
| | | | | | | | It would previously fail with `set shell=sh` (no slash). For the test itself we can just use a non-existing (fake) shell, because it is only about the verbose output. Ref: https://github.com/neovim/neovim/issues/9330
* viml/profile: revert proftime_T to unsigned type #10521Justin M. Keyes2019-07-16
| | | | | | | | | | | | | | - reltimestr(): Produce negative value by comparing the unsigned proftime_T value to INT64_MAX. https://github.com/neovim/neovim/issues/10452#issuecomment-511155132 1. The interfaces of nearly all platforms return uint64_t. INT64_MAX is only half of that. 2. Low-level interfaces like this typically define that there is no fixed starting point. The only guarantees are that it's (a) monotonically increasing at a rate that (b) matches real time. ref 06af88cd72ea fix #10452
* Fix is_executable_in_path() on Windows (#10468)erw72019-07-15
| | | | | | | | * Fix problem that 1byte extra memory was allocated in is_executable_in_path * Revert "Revert "tests: executable_spec: enable pending test #10443" (#10454)" This reverts commit 13fbeda0e56db36aeeb865bb5b33d13f69b2fdbc.
* viml/reltime(): allow negative result #10453Justin M. Keyes2019-07-09
| | | | | | - define proftime_T as signed integer - profile_sub(): allow negative result closes #10452
* Revert "tests: executable_spec: enable pending test #10443" (#10454)Daniel Hahler2019-07-09
| | | This reverts commit b53c483a4a6db91aad621d5f404cc6e930b434de.
* CI: improve gcov handling #10404Daniel Hahler2019-07-07
| | | | | | | | | - Move __gcov_flush to process_spawn, for more reliable coverage tracking of subprocesses - Travis: use GCOV_ERROR_FILE - codecov: use "-X fix" to skip "fixing" uploaded coverage data; it should be handled by codecov's backend instead. - AppVeyor: no $PATH mangling, which breaks with the improved coverage tracking due to missing .dll in PATH.
* tests: executable_spec: enable pending test #10443Daniel Hahler2019-07-07
| | | Should hopefully work now after efc6d9951b.
* tests: executable_spec: keep assertion (#10408)Daniel Hahler2019-07-03
| | | | It was moved to become pending in 18127f64c, but the assertion should be kept.
* tests: fix flaky "timers can be stopped from the handler" (#10364)Daniel Hahler2019-06-29
| | | | | | | | | | | | Seen on Travis (osx): [ RUN ] timers can be stopped from the handler: FAIL .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same. Passed in: (number) 2 Expected: (number) 3 stack traceback: .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>