aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/api_spec.lua
Commit message (Collapse)AuthorAge
* refactor(api)!: rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | 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.
* test: allow exec_lua to handle functionsLewis Russell2024-08-02
| | | | | | | | | | | Problem: Tests have lots of exec_lua calls which input blocks of code provided as unformatted strings. Solution: Teach exec_lua how to handle functions.
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: do not inject vim module into global helpersLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* fix(lua): allow nil values in serialized Lua arrays (#26329)Gregory Anders2023-12-07
| | | | | | | | | | | When we convert a Lua table to an Object, we consider the table a "dictionary" if it contains only string keys, and an array if it contains all numeric indices with no gaps. While rare, Lua tables can have both strictly numeric indices and gaps (e.g. { [2] = 2 }). These currently cannot be serialized because it is not considered an array. However, we know the maximum index of the table and as long as all of the keys in the table are numeric, it is still possible to serialize this table as an array. The missing indices will have nil values.
* fix(api): revert unintended change of optional bool paramsbfredl2023-08-09
| | | | | | | | | | Currently (as of nvim 0.9), the behavior of boolean params in vim.api lua wrappers is inconsistent for optional parameters (part of an `opts` dict) compared to positional parameters. This was inadvertently changed in #24524 . While cleaning up this inconsistency is something we might want eventually, it needs to be discussed separately and the impact of existing code considered.
* test(api): update tests to new error messagesbfredl2023-08-07
|
* vim-patch:8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level (#23131)zeertzjq2023-04-16
| | | | | | | | Problem: Vim9: exception in ISN_INSTR caught at wrong level. Solution: Set the starting trylevel in exec_instructions(). (closes vim/vim#8214) https://github.com/vim/vim/commit/ff65288aa89dcd50760ad942d58baff70c6e93e6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(api): convert blob to NUL-terminated API stringSean Dewar2022-02-26
| | | | | Looks like I did an oopsie; although API strings carry a size field, they should still be usable as C-strings! (even though they may contain embedded NULs)
* fix(lua): stricter type check when calling API function (#16745)dundargoc2022-01-03
| | | | | Solves #13651 Co-authored-by: Gregory Anders <greg@gpanders.com>
* feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | Add support for adding and removing custom user commands with the Nvim API.
* feat(lua): enable stack traces in error output (#16228)Gregory Anders2021-11-06
|
* fix(api): check type in nlua_pop_keydict (#15940)virchau132021-10-08
|
* feat(decode_string): decode binary string with NULs to BlobSean Dewar2021-09-15
| | | | | | | | Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
* feat(api): convert Blobs to API stringsSean Dewar2021-09-15
| | | | Note that these are not NUL-terminated; the API supports this.
* API: include invalid buffer/window/tabpage in error message (#11712)Daniel Hahler2020-01-14
|
* Add v:lua.func() vimL syntax for calling luaBjörn Linse2019-11-16
| | | | Also simplify error messages when calling lua from vimL.
* functests: Fix testsZyX2017-05-08
|
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|
* functests: Check whether it is a problem with an arrayZyX2017-04-11
|
* functests: Add another check for the similar transformationZyX2017-04-11
| | | | | | | Reasoning is majorly the same: check whether lua has bug or API function has bug, but on the other side: previous commit is checking whether similar bug when using API via msgpack RPC, this commit is checking whether another API function used via lua bindings triggers the same bug. Should additionally give a hint about which lua code contains a bug.
* functests: Make sure funcs.luaeval receives only one argumentZyX2017-04-11
|
* api: Rename _vim_id functions to nvim__idZyX2017-04-08
|
* functests: Some more testsZyX2017-03-27
|
* functests: Move existing tests from lua_spec to lua/*, fix themZyX2017-03-27
|
* functests: Add some testsZyX2017-03-27