aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/api_functions_spec.lua
Commit message (Collapse)AuthorAge
* test: reorg #15698Justin M. Keyes2021-09-17
| | | | | | | | | | | | | | | | | | | | Problem: Subdirectories like "visual", "insert", "normal" encourage people to separate *related* tests for no good reason. Typically the _mode_ is not the relevant topic of a test (and when it is, _then_ create an appropriate describe() or it()). Solution: - Delete the various `test/functional/<mode>/` subdirectories, move their tests to more meaningful topics. - Rename `…/normal/` to `…/editor/`. - Move or merge `…/visual/*` and `…/insert/*` tests into here where appropriate. - Rename `…/eval/` to `…/vimscript/`. - Move `…/viml/*` into here also. * test(reorg): insert/* => editor/mode_insert_spec.lua * test(reorg): cmdline/* => editor/mode_cmdline_spec.lua * test(reorg): eval core tests => eval_spec.lua
* feat(api): convert Blobs to API stringsSean Dewar2021-09-15
| | | | Note that these are not NUL-terminated; the API supports this.
* test: textlock api errornotomo2020-12-16
|
* feat(lua): improve error message to make it actionable (#13276)Alvaro Muñoz2020-11-13
| | | * improve error message to make it actionable
* API: include invalid buffer/window/tabpage in error message (#11712)Daniel Hahler2020-01-14
|
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
* eval/api: don't allow the API to be called in the sandbox.Björn Linse2019-06-26
| | | | | Identifying and maintaining a "secure" subset of the API would be too much busywork. So just disable the entire thing.
* messages: use proper multiline error message for rpcrequest and API wrappersBjörn Linse2019-05-26
|
* test/channels_spec: cleanupJustin M. Keyes2019-05-12
| | | | | - Remove stray print() - Use uname() instead of system('uname')
* ui: refactor ui optionsBjörn Linse2018-02-13
|
* api: add metadata for ui eventsBjörn Linse2017-05-10
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* api: api_info()['version']Justin M. Keyes2016-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | API level is disconnected from NVIM version. The API metadata holds the current API level, and the lowest backwards-compatible level supported by this instance. Release 0.1.6 is the first release that reports the Nvim version and API level. metadata['version'] = { major: 0, minor: 1, patch: 6, api_level: 1, api_compatible: 0, api_prerelease: false, } The API level may remain unchanged across Nvim releases if the API has not changed. When changing the API, - set NVIM_API_PRERELEASE to true - increment NVIM_API_LEVEL (at most once per Nvim version) - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken api_level_0.mpack was generated from Nvim 0.1.5 with: nvim --api-info
* api: Nvim version, API level #5386Rui Abreu Ferreira2016-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API level is disconnected from the NVIM version. The API metadata holds the current API level, and the lowest backwards-compatible level supported by this instance. Release 0.1.6 will be the first release reporting the Nvim version and API level. metadata['version'] = { major: 0, minor: 1, patch: 6, prerelease: true, api_level: 1, api_compatible: 0, } The API level may remain unchanged across Neovim releases if the API has not changed. When changing the API the CMake variable NVIM_API_PRERELEASE is set to true, and NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented accordingly. The functional tests check the API table against fixtures of past versions of Neovim. It compares all the functions in the old table with the new one, it does ignore some metadata attributes that do not alter the function signature or were removed since 0.1.5. Currently the only fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
* api: Establish API naming convention. (#5344)Justin M. Keyes2016-09-17
| | | | | | | | | | | | | | | | | | | | | old name: new name: -------------------------------------------------- nvim_name_to_color nvim_get_color_by_name nvim_get_current_buffer nvim_get_current_buf nvim_get_current_window nvim_get_current_win nvim_get_buffers nvim_list_bufs nvim_get_tabpages nvim_list_tabpages nvim_get_windows nvim_list_wins nvim_set_current_buffer nvim_set_current_buf nvim_set_current_window nvim_set_current_win nvim_change_directory nvim_set_current_dir nvim_tabpage_get_window nvim_tabpage_get_win nvim_tabpage_get_windows nvim_tabpage_list_wins nvim_win_get_buffer nvim_win_get_buf nvim_report_error nvim_err_writeln Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: ZyX <kp-pav@yandex.ru> Helped-by: James McCoy <jamessan@jamessan.com>
* api: add tests for calling the api from vimscriptBjörn Linse2016-08-31