Problem: Code in eval.c not sufficiently covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closesvim/vim#5815)
8b63313510
Nvim does not have v:none, so comment out test for it.
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closesvim/vim#5892)
ee4e0c1e9a
Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
1e1153600c
Some of the changes were already applied previously.
v8.1.0736 made some changes for making some emsgs more specific.
Includes the change for Test_lambda_fails() in test_lambda.vim.
Adjust relevant functionaltests to expect the new emsgs.
This patch has been fully ported in my Blob port PR, but it hasn't been
merged yet, so just use what we need from it for now.
Required for v8.1.1821.
Problem: Calling a lambda is slower than evaluating a string.
Solution: Make calling a lambda faster. (Ken Takata, closesvim/vim#5727)
f10806b250
Port "uf_flags" constants from patch 8.2.1054 to sync with Vim.
Port user_func_error() from patch 8.2.0149.
Port Test_lambda_scope() changes from patch 8.1.0736 so that it passes.
Problem: Error when defining a Lambda with index of a function result.
Solution: When not evaluating an expression and skipping a function call,
set the return value to VAR_UNKNOWN.
b4518563c7
From test_alot.vim:
Found errors in Test_lambda_with_timer():
First run:
function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0
Second run:
function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0
previously: #9220
- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
ref #6829
ref e39dade80b
ref de13113dc1
ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
> We don't guarantee that a X ms timer is triggered during Y ms sleep
> for any X<Y, though I would expect the load to be really bad for this
> to happen with X=10ms, Y=40ms.
- Call test_garbagecollect_now(), as Vim does.
- window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so
that it follows output.
- inccommand_spec.lua: Increase timeout to allow 2nd retry.
- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
ref #6829
ref e39dade80b
ref de13113dc1
ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
> We don't guarantee that a X ms timer is triggered during Y ms sleep
> for any X<Y, though I would expect the load to be really bad for this
> to happen with X=10ms, Y=40ms.
Problem: Using function() with a name will find another function when it is
redefined.
Solution: Add funcref(). Refer to lambda using a partial. Fix several
reference counting issues.
437bafe4c8
Problem: User defined functions can't be a closure.
Solution: Add the "closure" argument. Allow using :unlet on a bound
variable. (Yasuhiro Matsumoto, Ken Takata)
10ce39a0d5
Problem: filter() and map() either require a string or defining a function.
Solution: Support lambda, a short way to define a function that evaluates an
expression. (Yasuhiro Matsumoto, Ken Takata)
069c1e7fa9
Problem: Cannot detect a crash in tests when caused by garbagecollect().
Solution: Add garbagecollect_for_testing(). Do not free a job if is still
useful.
ebf7dfa6f1