aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval
Commit message (Collapse)AuthorAge
* vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 ↵zeertzjq2023-01-19
| | | | | | | | | | (#21883) Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work. https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(unittests): fix TUI broken test previously ignoredbfredl2023-01-18
|
* vim-patch:8.2.1852: map() returing zero for NULL list is unexpectedzeertzjq2022-10-26
| | | | | | | | | Problem: map() returing zero for NULL list is unexpected. Solution: Return the empty list. (closes vim/vim#7133) https://github.com/vim/vim/commit/ffdf8adfa8108d4765fdc68abbd2fe49a4292b25 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:7.4.1168 (#19645)zeertzjq2022-08-13
| | | | | | Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay Pavlov) Solution: Make the string "v:true" instead of "true". https://github.com/vim/vim/commit/f48aa160fdd7b8caa7678e1a2139244dd2bdc547
* vim-patch:8.2.1473: items in a list given to :const can still be modifiedSean Dewar2021-09-16
| | | | | | | Problem: Items in a list given to :const can still be modified. Solution: Work like ":lockvar! name" but don't lock referenced items. Make locking a blob work. https://github.com/vim/vim/commit/021bda56710d98c09a6b35610a476ab2dd8c58ad
* vim-patch:8.1.0897: can modify a:000 when using a reference (#14902)Jan Edmund Lazo2021-06-26
| | | | | | Problem: Can modify a:000 when using a reference. Solution: Make check for locked variable stricter. (Ozaki Kiichi, closes vim/vim#3930) https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788
* 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
* 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
* gen_api_dispatch.lua: allow msgpack int for Float args; test: add ↵Yatao Li2020-04-28
| | | | ui_pum_set_bounds and tv_dict_add_float tests
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* 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
* test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* *: Provide list length when allocating listsZyX2018-01-14
|
* *: Fix linter errorsZyX2017-12-24
|
* eval: Replace some tv_list_item_remove() callsZyX2017-12-24
| | | | | There is nothing wrong with them, just it is generally better to remove a range then to remove items individually.
* eval: Rename tv_list_remove_items() to tv_list_drop_items()ZyX2017-12-24
| | | tv_list_remove_items() may cause confusion with tv_list_item_remove()
* eval/typval: Make tv_list_item_remove return pointer to the next itemZyX2017-12-24
|
* 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().
* *: Remove most calls to tv_list_item_allocZyX2017-12-24
| | | | Still left calls in eval/typval.c and test/unit/eval/helpers.lua. Latter is the only reason why function did not receive `static` modifier.
* 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: Fix allocation ordering for tv_dict_add_str()ZyX2017-07-02
|
* eval/typval: Add tv_dict_add_allocated_str() functionZyX2017-07-02
|
* eval: Refactor get_user_input to support dictionaryZyX2017-05-10
|
* unittests: Add a test for TV_CSTRINGZyX2017-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not using enum{} because SIZE_MAX exceeds integer and I do not really like how enum definition is described in C99: 1. Even though all values must fit into the chosen type (6.7.2.2, p 4) the type to choose is still implementation-defined. 2. 6.4.4.3 explicitly states that “an identifier declared as an enumeration constant has type `int`”. So it looks like “no matter what type was chosen for enumeration, constants will be integers”. Yet the following simple program: #include <stdint.h> #include <stdio.h> #include <stddef.h> enum { X=SIZE_MAX }; int main(int argc, char **argv) { printf("x:%zu m:%zu t:%zu v:%zu", sizeof(X), sizeof(SIZE_MAX), sizeof(size_t), (size_t)X); } yields one of the following using different compilers: - clang/gcc/pathcc: `x:8 m:8 t:8 v:18446744073709551615` - pcc/tcc: `x:4 m:8 t:8 v:1844674407370955161` If I remove the cast of X to size_t then pcc/tcc both yield `x:4 m:8 t:8 v:4294967295`, other compilers’ output does not change. All compilers were called with `$compiler -std=c99 -xc -` (feeding program from echo), except for `tcc` which has missing `-std=c99`. `pcc` seems to ignore the argument though: it is perfectly fine with `-std=c1000`.
* Merge #6439 from ZyX-I/fix-gc-failuresJustin M. Keyes2017-04-09
|\ | | | | unittests: Force GC, fix GC failures in typval_spec
| * unittests: Move allocating vimconv_T to a functionZyX2017-04-09
| |
| * unittests: Do not GC typval_T which is owned by a diZyX2017-04-09
| |
| * unittests: Do not unref partial which is owned by Callback structureZyX2017-04-09
| |
| * unittests: Use Neovim memory allocation for vimconv_TZyX2017-04-09
| | | | | | | | Not sure whether this is going to fix things though, but core dump does not contain Neovim functions in stack in this case.
| * unittests: Do not gc what is already freedZyX2017-04-09
| |
| * unittests: Fix testlint failureZyX2017-04-07
| |
| * unittests: Force GC, fix GC failures in typval_specZyX2017-04-06
| |
* | unittests: Fix linter errorZyX2017-04-09
| |
* | unittests: Do not alter p_enc in decode unit testZyX2017-04-08
|/
* eval/typval,api/buffer: Fix review commentsZyX2017-03-29
|
* eval/typval: Allow NULL dict as tv_dict_get_callback() argumentZyX2017-03-29
| | | Also removes NULL key input: tv_dict_find() does not allow this.
* unittests: Fix linter errorsZyX2017-03-29
|
* unittests: Add tv_get_string* testsZyX2017-03-29
|
* unittests: Add tv_get number testsZyX2017-03-29
|
* unittests: Move tv_dict_add* tests to a proper describe() blockZyX2017-03-29
|
* unittests: Add tv_check… testsZyX2017-03-29
|
* unittests: Add tv_equal() testsZyX2017-03-29
|
* unittests: Test locks sectionZyX2017-03-29
|
* unittests: Test tv_copy()ZyX2017-03-29
|
* unittests: Add tests for tv_clear()ZyX2017-03-29
|
* unittests: Add test for tv_dict_set_keys_readonlyZyX2017-03-29
|
* unittests: Add tv_dict_copy testsZyX2017-03-29
|
* unittests: Add tests for tv_dict_extendZyX2017-03-29
|
* unittests: Add tv_dict_clear testsZyX2017-03-29
|