aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval
Commit message (Collapse)AuthorAge
...
* eval/typval: Add tv_list_equal() tests, compare NULL lists equalZyX2017-03-29
|
* unittests: Test tv_list_join()ZyX2017-03-29
|
* unittests: Fix tests crashZyX2017-03-29
| | | | | | | | | | | Tests crash at some point without - `after_each(collectgarbage)` right before “typval.c list copy() copies list correctly and converts items” test. - Commenting out that test. - Adding `collectgarbage()` after the test (what actually this commit does). Adding `collectgarbage()` to top-level `after_each` block right after `restore_allocators` makes running this file crash even if it is run alone.
* 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: Test tv_list_concat()ZyX2017-03-29
|
* unittests: Test tv_list_copyZyX2017-03-29
| | | | | | | | | | | | | Also found some bugs: 1. var_item_copy() always fails to copy v:_null_list and v:_null_dict. Fixing this should mean fixing `deepcopy(v:_null_list)` which should’ve been, but was not listed in #4615. This also fixes `deepcopy(v:_null_dict)`. 2. var_item_copy() crashes when trying to copy NULL string with `conv != NULL`. 3. `conv` argument is ignored when copying list unless `deep` is true, but it was not reflected in documentation. 4. `tv_dict_item_alloc_len()` allocated more memory then needed. 5. typvalt2lua was not able to handle self-referencing containers.
* unittests: Add tests for tv_list_insert*()/…append*() functionsZyX2017-03-29
|
* unittests: Add tests for tv_list_insert()ZyX2017-03-29
|
* unittests: Add tests for list watchers and list alloc/free/unrefZyX2017-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
|
* eval: Remove eval_expr() completelyZyX2017-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: Fix linter errorsZyX2017-03-11
|
* 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
|
* unittests: Run all unit tests in their own processesZyX2017-03-11
| | | | | | | | | | | | | | | Used sed -r -i -e '/ helpers =/ s/$/\nlocal itp = helpers.gen_itp(it)/; s/^(\s*)it\(/\1itp(/' test/unit/**/*_spec.lua to alter all tests. Locally they all run fine now. Reasoning: 1. General: state from one test should not affect other tests. 2. Local: travis build is failing with something which may be an output of garbage collector. This should prevent state of the garbage collector from interferring as well.
* unittest: Fix linter errorsZyX2017-01-07
|
* unittest: Add failing test for freeing dictionaries in a listZyX2017-01-07
|
* unittest: Add dict_items functionZyX2017-01-07
|
* unittest: Add failing test of freeing listsZyX2017-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).
* build: Target luacheck HEAD.Justin M. Keyes2016-11-17
| | | | | | | | | | | | https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606 > If you really want to use bleeding-edge version you should get the > rockspec from master branch, not a fixed commit ... > The correct way to install from a specific commit is cloning that > commit and running "luarocks make" from project directory. The reason > is that running "install" or "build" on an scm rockspec fetches > sources from master but uses build description from the rockspec > itself, which may be outdated.
* 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: Make sure that encoder can encode NULL variablesZyX2016-04-18
| | | | | | | | | Adds two undocumented v: variables: _null_list and _null_dict because I do not know a reproducible way to get such lists (though I think I heard about this) and dictionaries (do not remember hearing about them). NULL strings are obtained using $XXX_UNEXISTENT_VAR_XXX. Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked fine before this commit.
* functests: Replace \xXX escapes with \DDD in lua codeZyX2016-04-18
|
* eval/decode: Do not overflow when parsing `-`ZyX2016-04-18
| | | Also makes if’s less nested.
* eval/decode: Make sure that error messages do not cause overflowZyX2016-04-18
|
* eval/decode: Make sure that parsing strings does not overflowZyX2016-04-18
|
* eval/decode: Avoid overflow when parsing incomplete null/true/falseZyX2016-04-18
| | | | Note: second test does not crash or produce asan errors, even though it should.
* 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