summaryrefslogtreecommitdiffstatshomepage
path: root/test/unit/api
AgeCommit message (Collapse)AuthorFiles
2025-05-22fix(tests): use uv.spawn instead of io.popen for unittest helpersbfredl2
The old implementation of repeated_read_cmd would attempt to run the command multiple times to handle racyness of async output. Code like this should not be written. Instead, use the libuv event loop to read until the process has exited and the pipe has been closed. This causes some previous discarded errors to be propagated. Fix these as well.
2024-09-23refactor(api)!: rename Dictionary => DictJustin M. Keyes2
In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
2024-04-10refactor(test): inject after_each differentlyLewis Russell2
2024-04-08test: improve test conventionsdundargoc2
Work on https://github.com/neovim/neovim/issues/27004.
2024-02-15refactor(eval): use arena when converting typvals to Objectbfredl1
Note: this contains two _temporary_ changes which can be reverted once the Arena vs no-Arena distinction in API wrappers has been removed. Both nlua_push_Object and object_to_vim_take_luaref() has been changed to take the object argument as a pointer. This is not going to be necessary once these are only used with arena (or not at all) allocated Objects. The object_to_vim() variant which leaves luaref untouched might need to stay for a little longer.
2023-12-04build: enable lintlua for test/unit/ dir #26396Justin M. Keyes2
Problem: Not all Lua code is checked by stylua. Automating code-style is an important mechanism for reducing time spent on accidental (non-essential) complexity. Solution: - Enable lintlua for `test/unit/` directory. - TODO: only `test/functional/` remains unchecked. previous: 45fe4d11add933df76a2ea4bf52ce8904f4a778b previous: 517f0cc634b985057da5b95cf4ad659ee456a77e
2021-10-29refactor(api): break out Vim script functions to its own fileBjörn Linse1
2019-01-17test: Lua 5.2/5.3 compatMatěj Cepl1
close #9515 ref #9280
2017-03-11unittests: Fix linter errorsZyX1
2017-03-11unittests: Do not import libnvim or headers in main processZyX1
Slows down unit tests much, but gets rid of as much preserved state as possible.
2017-03-11unittests: Check core dumps in after_each, like in functestsZyX2
2017-03-11unittests: Run all unit tests in their own processesZyX1
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.
2017-03-01test: luacheck updateJustin M. Keyes1
We pull luacheck HEAD, so this is a "catch up" commit to fix newly-discovered errors.
2017-01-03unittests: Fix linter errorsZyX1
2017-01-03tests: Add tests for partials dumpingZyX1
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).
2016-06-24unittests/*/helpers: Fix testlint errorsZyX1
2016-06-24fixup! unittests: Add tests for vim_to_object functionZyX2
2016-06-24unittests: Add tests for vim_to_object functionZyX2