aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
Commit message (Collapse)AuthorAge
...
* Merge #7917 'API: buffer updates'Justin M. Keyes2018-06-08
|\
| * Add empty options dict to buf_attachKillTheMule2018-05-23
| |
| * Rename some more, fixe borked renamingKillTheMule2018-05-23
| |
| * Send changedtick as first event if buffer contents weren't requestedKillTheMule2018-05-23
| |
| * Unify updates_start and updates to lines_eventKillTheMule2018-05-23
| | | | | | | | Also rename changedtick -> changedtick_event
| * Update testKillTheMule2018-05-23
| |
| * Some renamings and doc changesKillTheMule2018-05-23
| |
| * Try fixing that test on travisKillTheMule2018-05-23
| |
| * Increase sendkeys timeoutKillTheMule2018-05-23
| |
| * The grand renamingKillTheMule2018-05-23
| |
| * Fix tests on windowsKillTheMule2018-05-23
| | | | | | | | | | | | | | | | `cat` is distributed with neovim, so when can use it everywhere, as opposed to `sort`. The diffget test fails for unknown reasons on appveyor, mark it pending for now.
| * Make LiveUpdate return lastline instead of numreplacedKillTheMule2018-05-23
| | | | | | | | In analogy to `nvim_buf_set_lines`.
| * LintKillTheMule2018-05-23
| |
| * Make separate functions to start/stop live updatesKillTheMule2018-05-23
| |
| * Add argument to not send a buffers content when updates are enabledKillTheMule2018-05-23
| | | | | | | | Add a test.
| * Tests for buffer updatesPeter Hodge2018-05-23
| | | | | | | | | | Originally written by @phodge in https://github.com/neovim/neovim/pull/5269.
* | API: validation: mention invalid method name (#8489)Justin M. Keyes2018-06-07
| |
* | nvim_list_uis: include channel idBjörn Linse2018-06-01
|/
* api: list information about all channels/jobs.Björn Linse2018-05-23
| | | | | Fire autocmd when channel opens or its info changes. Add a way for API clients can describe themselves.
* API: nvim_get_commands(): return DictionaryJustin M. Keyes2018-05-12
|
* API: nvim_get_commands(): builtin is irrelevant for buffer-localJustin M. Keyes2018-05-12
| | | | | builtin commands are never buffer-local, so we can return empty for that case.
* API: nvim_get_commands(): more attributesJustin M. Keyes2018-05-11
| | | | | | | Support more :command attributes: -bang -bar -register
* API: nvim_get_commands(): always return keysJustin M. Keyes2018-05-11
| | | | | | - Always return all keys, with at least NIL value. - Require `opts` param to be {"builtin":false} - Validate `opts` param
* API: nvim_get_commands()Nimit Bhardwaj2018-05-11
|
* Merge #8329 'API: Make nvim_set_option() update `:verbose set …`'Justin M. Keyes2018-05-11
|\
| * api: Make nvim_set_option() update `:verbose set ...`b-r-o-c-k2018-05-03
| | | | | | | | | | | | Make `:verbose set ...` show when an option was last modified by an API client or Lua script/chunk. In the case of an API client, the channel ID is displayed.
* | test: API: fix tests after improved error captureJustin M. Keyes2018-05-10
| |
* | API: nvim_eval(): return non-generic VimL errorsJustin M. Keyes2018-05-09
| | | | | | | | Use the same pattern as nvim_call_function (_call_function).
* | API: return non-generic VimL errorsJustin M. Keyes2018-05-09
| | | | | | | | | | | | | | | | | | | | - Return VimL errors instead of generic errors for: - nvim_call_function - nvim_call_dict_function - Fix tests which were silently broken before this change. This violates #6150 where we agreed not to translate API errors. But that can be fixed later.
* | API: nvim_call_dict_function: expect actual function, not nameJustin M. Keyes2018-05-06
| |
* | API: nvim_call_dict_function: eliminate `internal` paramJustin M. Keyes2018-05-06
| | | | | | | | | | | | The `internal` param is difficult to explain, and will rarely be anything but `true`. To avoid it, use a hack: check if the resolved dict value starts with "function(".
* | refactor: nvim_call_dict_functionJustin M. Keyes2018-05-06
| | | | | | | | | | - Add test coverage for errors. - Rename, rearrange.
* | API: nvim_call_dict_function #3032Sebastian Witte2018-05-06
| |
* | test: nvim_call_function: verify "too many arguments" errorJustin M. Keyes2018-05-06
|/
* API/nvim_command_output: handle :echon capture (#8265)Justin M. Keyes2018-04-13
| | | ref https://github.com/neovim/python-client/pull/290
* test/util: expect_err() (#8257)Justin M. Keyes2018-04-11
| | | other cleanup, ref #8245
* test/API: validate channel arg (#8245)Justin M. Keyes2018-04-08
|
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* TUI: implement "standout" attribute #8081Nimit Bhardwaj2018-03-27
| | | | closes #8054
* API: nvim_get_proc()Justin M. Keyes2018-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TODO: "exepath" field (win32: QueryFullProcessImageName()) On unix-likes `ps` is used because the platform-specific APIs are a nightmare. For reference, below is a (incomplete) attempt: diff --git a/src/nvim/os/process.c b/src/nvim/os/process.c index 09769925aca5..99afbbf290c1 100644 --- a/src/nvim/os/process.c +++ b/src/nvim/os/process.c @@ -208,3 +210,60 @@ int os_proc_children(int ppid, int **proc_list, size_t *proc_count) return 0; } +/// Gets various properties of the process identified by `pid`. +/// +/// @param pid Process to inspect. +/// @return Map of process properties, empty on error. +Dictionary os_proc_info(int pid) +{ + Dictionary pinfo = ARRAY_DICT_INIT; +#ifdef WIN32 + +#elif defined(__APPLE__) + char buf[PROC_PIDPATHINFO_MAXSIZE]; + if (proc_pidpath(pid, buf, sizeof(buf))) { + name = getName(buf); + PUT(pinfo, "exepath", STRING_OBJ(cstr_to_string(buf))); + return name; + } else { + ILOG("proc_pidpath() failed for pid: %d", pid); + } +#elif defined(BSD) +# if defined(__FreeBSD__) +# define KP_COMM(o) o.ki_comm +# else +# define KP_COMM(o) o.p_comm +# endif + struct kinfo_proc *proc = kinfo_getproc(pid); + if (proc) { + PUT(pinfo, "name", cstr_to_string(KP_COMM(proc))); + xfree(proc); + } else { + ILOG("kinfo_getproc() failed for pid: %d", pid); + } + +#elif defined(__linux__) + char fname[256] = { 0 }; + char buf[MAXPATHL]; + snprintf(fname, sizeof(fname), "/proc/%d/comm", pid); + FILE *fp = fopen(fname, "r"); + // FileDescriptor *f = file_open_new(&error, fname, kFileReadOnly, 0); + // ptrdiff_t file_read(FileDescriptor *const fp, char *const ret_buf, + // const size_t size) + if (fp == NULL) { + ILOG("fopen() of /proc/%d/comm failed", pid); + } else { + size_t n = fread(buf, sizeof(char), sizeof(buf) - 1, fp); + if (n == 0) { + WLOG("fread() of /proc/%d/comm failed", pid); + } else { + size_t end = MIN(sizeof(buf) - 1, n); + end = (end > 0 && buf[end - 1] == '\n') ? end - 1 : end; + buf[end] = '\0'; + PUT(pinfo, "name", STRING_OBJ(cstr_to_string(buf))); + } + } + fclose(fp); +#endif + return pinfo; +}
* API: nvim_get_proc_children()Justin M. Keyes2018-03-16
| | | | ref https://github.com/libuv/libuv/pull/836
* test: rename next_message() to next_msg()Justin M. Keyes2018-03-11
|
* api: nvim_list_uis #8004geekodour2018-03-03
| | | | | ref #7438 closes #4842
* ui: refactor ui optionsBjörn Linse2018-02-13
|
* test: :! print binary data, control charsJustin M. Keyes2018-02-07
| | | | | | | | | | closes #5442 closes #4142 ref #6618 ref #4376 ref #7844 ref #2958 ref #4338
* shell: update `execute('!cmd')` test to new behaviorBjörn Linse2018-02-06
| | | | And similarly nvim_command_output test
* functests: Improve error reporting in _check_parsing functionZyX2018-02-02
| | | May be needed for unit tests as well though.
* api: nvim_command_output: direct implJustin M. Keyes2018-01-10
|
* api: change nvim_command_output behaviorJustin M. Keyes2018-01-10
| | | | | | | | | | | | | | | | | | | Implement nvim_command_output with `execute({cmd},"silent")`. Behavior changes: - does not provoke any hit-enter prompt - no longer prepends a newline char - does not capture some noise (like the "[New File]" message, see the change to tabnewentered_spec.lua) Technically ("bug-for-bug") this a breaking change. But the previous behavior of nvim_command_output meant that it probably wasn't used for anything outside of tests. Also remove the undocumented `v:command_output` variable which was a hack introduced only for the purposes of nvim_command_output. closes #7726
* *: Replace all occurrences of NVim with NvimZyX2017-11-30
|