aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
Commit message (Collapse)AuthorAge
...
| * api: {get,set}_option should {get,set} global value of local options (#6405)Jakob Schnitzer2017-03-30
| | | | | | | | | | - nvim_get_option should return the global default of a local option. - nvim_set_option should set the global default of a local option.
* | functests: Test for error conditionsZyX2017-03-27
|/ | | | | | | | | | | | | | | | | | | | | | | During testing found the following bugs: 1. msgpack-gen.lua script is completely unprepared for Float values either in return type or in arguments. Specifically: 1. At the time of writing relevant code FLOAT_OBJ did not exist as well as FLOATING_OBJ, but it would be used by msgpack-gen.lua should return type be Float. I added FLOATING_OBJ macros later because did not know that msgpack-gen.lua uses these _OBJ macros, otherwise it would be FLOAT_OBJ. 2. msgpack-gen.lua should use .data.floating in place of .data.float. But it did not expect that .data subattribute may have name different from lowercased type name. 2. vim_replace_termcodes returned its argument as-is if it receives an empty string (as well as _vim_id*() functions did). But if something in returned argument lives in an allocated memory such action will cause double free: once when freeing arguments, then when freeing return value. It did not cause problems yet because msgpack bindings return empty string as {NULL, 0} and nothing was actually allocated. 3. New code in msgpack-gen.lua popped arguments in reversed order, making lua bindings’ signatures be different from API ones.
* api: Make sure dict_set_var doesn’t edit read-only valuesZyX2017-02-23
| | | Fixes #6147
* functests: Destroy accidental folds in api/vim_specZyX2017-02-23
|
* test/api: Specify handling of VimL errors, v:errmsg.Justin M. Keyes2016-10-24
| | | | TODO: Also spec behavior of Press-Enter prompt for these API functions.
* api: call multiple methods atomically (useful in async contexts)Björn Linse2016-10-22
| | | | remove unused response_id parameter of handle_nvim_... helpers
* 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: make nvim[_obj]_set_var and _del_var not return the old valueBjörn Linse2016-09-15
|
* api: fix leak when a api function is incorrectly called with a list.Björn Linse2016-08-31
| | | | This applies both to msgpack-rpc and eval.
* api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
|
* functionaltest: Create lua helper for os.tmpname()Rui Abreu Ferreira2016-08-31
| | | | | | | | | | | | | | | In Windows Lua's os.tmpname() returns relative paths starting with \s, prepend them with $TEMP to generate a valid path. In OS X os.tmpname() returns paths in '/tmp' but they should be in '/private/tmp'. We cannot use os_name() for platform detection because some tests use tempname() before nvim is spawned, instead use one of the following: 1. Set SYSTEM_NAME environment variable before calling the tests, it is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows') 2. Call uname -s 3. Assume windows
* tests: don't ignore highlights in various testsBjörn Linse2016-08-14
|
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
* Satisfy testlint.KillTheMule2016-04-28
| | | | For that, make luatest ignore the preload.lua files.
* functests: Make json_functions_spec use new NIL where appropriateZyX2016-04-18
|
* api: Replace set_var(name, NIL) with del_var(name)ZyX2016-04-18
|
* Update lua client to 0.0.1-24Thiago de Arruda2016-04-13
| | | | | The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that.
* Remove dependency on ffi moduleThiago de Arruda2016-03-07
|
* keymap: Support <D-...> (super/command key).Justin M. Keyes2016-02-22
| | | | | | | | | | | | | | | | | | | | Adds support for: - api:vim_input("<D-a>") - ":nnoremap <C-D-S-...>" and permutations thereof UIs must capture the modifier and send it as "<D-...>" to vim_input(). Note: Before this commit, any arbitrary ":nnoremap <{foo}-{bar}>" mapping could already be invoked with feedkeys("\<{foo}-{bar}>"). This commit supports "D-" as a modifier that can be combined with "C-", "A-", "S-" in any order. For non-GUI (terminal) support, user must: :set <D-a>={CSI sequence} then send the {CSI sequence} from their terminal. But this does not work yet (regression #2204). Closes #2190
* test/functional: Fix api/vim_spec.lua.Rui Abreu Ferreira2015-12-31
| | | | | On Windows the default file format is DOS i.e. newlines are \r\n instead of \n.
* test/functional: clean up according to luacheck (part 2)Marco Hinz2015-11-23
|
* input: Remove CURSORHOLD keyThiago de Arruda2015-10-26
| | | | | | | | | | | Refactor input.c, normal.c and edit.c to use the K_EVENT special key to trigger the CURSORHOLD event. In normal and edit mode, K_EVENT is treated as K_CURSORHOLD, which enables better handling of arbitrary actions in those states(eg: In normal mode the previous operator counts will be restored). Also fix a test in vim_spec.lua. The test had a wrong assumption: cmdheight is only used to determine when the press enter screen will be shown, not to limit how many lines or control pagination.
* api: vim_err_write: add tests for multiline handlingBjörn Linse2015-09-16
|
* Implement API function to call functions #2979Sebastian Witte2015-07-19
| | | | | Remove static modifier from func_call Move MAX_FUNC_ARGS definnition from eval.c to eval.h
* api: vim_set_var() should return the old value #2899Justin M. Keyes2015-06-25
| | | | Closes #2816
* test: NULL-initialized vimscript strings should eval to empty stringsBjörn Linse2015-02-16
|
* test: Make it possible to run functional tests with plain luaThiago de Arruda2015-01-22
| | | | Replace the hexadecimal escape sequences, which are only supported by luajit
* api: Add tests for when not to handle NULs.Scott Prager2014-12-06
|
* Functional tests for feedkeys CSI escapingRui Abreu Ferreira2014-11-27
| | | | - tests for vim_feedkeys and replace_termcodes
* test: verify that msgpacks-rpc exceptions are workingThiago de Arruda2014-10-23
|
* test: Use lua to perform sanity API checksThiago de Arruda2014-10-16
Sanity API checks made by the python-client in the api-python travis target were converted to lua and will now live in this repository. This will simplify performing breaking changes to the API as it won't be necessary to send parallel PRs the python-client.