aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval/helpers.lua
Commit message (Collapse)AuthorAge
* vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def functionzeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators. https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100 Omit source_nextline() and eval_next_non_blank(): Vim9 script only. N/A patches for version.c: vim-patch:8.2.1048: build failure without the eval feature Problem: Build failure without the eval feature. Solution: Add dummy typedef. https://github.com/vim/vim/commit/9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075)zeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def. https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file. https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1 vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724 vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants. https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier. https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable. https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345 vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code. https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: remove char_u (#22829)dundargoc2023-04-02
| | | Closes https://github.com/neovim/neovim/issues/459
* 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.1.1579: dict and list could be GC'ed while displaying errorJan Edmund Lazo2020-01-05
| | | | | | | | | Problem: Dict and list could be GC'ed while displaying error in a timer. (Yasuhiro Matsumoto) Solution: Block garbage collection when executing a timer. Add test_garbagecollect_soon(). Add "no_wait_return" to test_override(). (closes vim/vim#4571) https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
* *: Provide list length when allocating listsZyX2018-01-14
|
* eval/typval: Remove tv_list_item_free() as it is unusedZyX2017-12-24
|
* eval/typval: Make tv_list_item_alloc staticZyX2017-12-24
| | | | Better write this bit in lua then make reviewers or clint filter out tv_list_item_alloc().
* viml/parser/expressions: Start creating expressions parserZyX2017-10-08
| | | | | | | | | | | | | | Currently supported nodes: - Register as it is one of the simplest value nodes (even numbers are not that simple with that dot handling). - Plus, both unary and binary. - Parenthesis, both nesting and calling. Note regarding unit tests: it stores data for AST in highlighting in strings in place of tables because luassert fails to do a good job at representing big tables. Squashing a bunch of data into a single string simply yields more readable result.
* unittests: Do not unref partial which is owned by Callback structureZyX2017-04-09
|
* unittests: Test tv_copy()ZyX2017-03-29
|
* unittests: Add tests for tv_dict_extendZyX2017-03-29
|
* unittests: Add tests for dictionary indexingZyX2017-03-29
|
* unittests: Add tv_dict_item_{add,remove} testsZyX2017-03-29
|
* unittests: Add tv_dict_watcher_{add,remove} testsZyX2017-03-29
|
* unittests: Add tests for tv_list_find*() functionsZyX2017-03-29
| | | | | | | | Additional modifications: - More `const` qualifiers in tested functions. - `tv_list_find_str()` second argument is more in-line with other `tv_list_find*()` functions.
* eval/typval,tests: Fix extending list with itself, add testsZyX2017-03-29
| | | | | Adds unit test for tv_list_extend and regression test for extend() VimL function.
* unittests: Add tests for tv_list_insert*()/…append*() functionsZyX2017-03-29
|
* unittests: Test tv_list_item_\* functionsZyX2017-03-29
| | | | To check that memory is free()d correctly.
* eval: Move copy_tv to eval/typvalZyX2017-03-29
|
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* unittests: Do not import libnvim or headers in main processZyX2017-03-11
| | | Slows down unit tests much, but gets rid of as much preserved state as possible.
* unittests: Check core dumps in after_each, like in functestsZyX2017-03-11
|
* unittest: Add dict_items functionZyX2017-01-07
|
* unittest: Allow mocking allocator callsZyX2017-01-07
|
* unittests: Fix linter errorsZyX2017-01-03
|
* tests: Add tests for partials dumpingZyX2017-01-03
| | | | | Also fixed dumping of partials by encode_vim_to_object and added code which is able to work with partials and dictionaries to test/unit/eval/helpers.lua (mostly copied from #5119, except for partials handling).
* unittests/*/helpers: Fix testlint errorsZyX2016-06-24
|
* fixup! unittests: Add tests for vim_to_object functionZyX2016-06-24
|
* unittests: Add tests for vim_to_object functionZyX2016-06-24
|
* Satisfy testlint.KillTheMule2016-04-28
| | | | For that, make luatest ignore the preload.lua files.
* eval/encode: Fix writing strings starting with NL to listZyX2016-04-18
Error [found][1] by oni-link. [1]: https://github.com/neovim/neovim/pull/4131/files#r52239384