aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | | | | | terminal: resize to the max dimensions (#8249)Andrew Pyatkov2018-04-16
| | | | | | | | | | | | | | | | | | | | | | | | closes #8096
* | | | | | job-control: children_kill_cb(): do not check elapsed timeJustin M. Keyes2018-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't check elapsed time in children_kill_cb(), it's already implied by the start-time of the timer itself. 2. Restart timer from children_kill_cb() for PTY jobs, to send SIGKILL after SIGTERM. There is an edge case where SIGKILL might follow SIGTERM too quickly, if jobstop() is called near the 2-second timer window. But this edge case is not worth code complication.
* | | | | | Merge #8120 'test: win: prefer cmd.exe'Justin M. Keyes2018-04-15
|\ \ \ \ \ \
| * | | | | | test: win: enable jobpid() testsJan Edmund Lazo2018-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ping to test job detach Use find.exe as an alternative to cat.exe Use nvim_get_proc to check pid
| * | | | | | fixup: ping.exe works with cmd.exe pipeJan Edmund Lazo2018-03-26
| | | | | | |
| * | | | | | Revert "test/win: use cmd.exe for test"Jan Edmund Lazo2018-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ae409b5042abdbec67305a063cf921ddffcce0c8. This PR (#8120) defaults to cmd.exe for job_spec.lua
| * | | | | | test: win: use find.exe /v "" as alternative cat -Jan Edmund Lazo2018-03-26
| | | | | | |
| * | | | | | test: win: try stderr callback and slow outputJan Edmund Lazo2018-03-26
| | | | | | |
| * | | | | | test: win: use powershell for Start-Sleep onlyJan Edmund Lazo2018-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmd.exe (shell) is faster and more reliable than powershell (.NET frontend). It's best for short and basic tests that don't require non-trivial scripting. cmd.exe doesn't support sleep so use powershell's Start-Sleep as substitute.
* | | | | | | events: VimSuspend, VimResume #8280geekodour2018-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #3648 ref #5959
* | | | | | | Merge #6272 'stdpath()'Justin M. Keyes2018-04-15
|\ \ \ \ \ \ \
| * | | | | | | test/options: Fix stdpath() failures on WindowsJames McCoy2018-04-01
| | | | | | | |
| * | | | | | | eval: Add stdpath() method (#5297)Christian Höltje2018-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the :stdpath method for fetching XDG standard directories. Fixes #5297
* | | | | | | | test: win: use "start" to test backgrounded job (#8171)Jan Edmund Lazo2018-04-15
| |_|_|_|/ / / |/| | | | | |
* | | | | | | API/nvim_command_output: handle :echon capture (#8265)Justin M. Keyes2018-04-13
| | | | | | | | | | | | | | | | | | | | | ref https://github.com/neovim/python-client/pull/290
* | | | | | | channels: delay free so that libuv can cleanup handlesBjörn Linse2018-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add test for a crash this caused
* | | | | | | test/util: expect_err() (#8257)Justin M. Keyes2018-04-11
| | | | | | | | | | | | | | | | | | | | | other cleanup, ref #8245
* | | | | | | server: init v:servername if $NVIM_LISTEN_ADDRESS is invalidJustin M. Keyes2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if $NVIM_LISTEN_ADDRESS was invalid, v:servername was left empty.
* | | | | | | server: introduce --listen, deprecate $NVIM_LISTEN_ADDRESSJustin M. Keyes2018-04-11
| | | | | | |
* | | | | | | serverstop(): return FALSE for invalid addressJustin M. Keyes2018-04-11
| | | | | | |
* | | | | | | test/util: matches()Justin M. Keyes2018-04-11
| | | | | | |
* | | | | | | test/API: validate channel arg (#8245)Justin M. Keyes2018-04-08
| | | | | | |
* | | | | | | Merge #8226 from justinmk/insert-mode-metaJustin M. Keyes2018-04-04
|\ \ \ \ \ \ \
| * | | | | | | insert-mode: interpret unmapped META as ESCJustin M. Keyes2018-04-04
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #2454 closes #8213 ref #7972
* | | | | | | screen: winhl=Normal:Background should not override syntax (#8093)Björn Linse2018-04-02
| | | | | | | | | | | | | | | | | | | | | fixes #7375
* | | | | | | Merge #5908 'shada: Also save numbered marks'Justin M. Keyes2018-04-02
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | functests: Use proper path in `eq()`ZyX2018-04-02
| | | | | | |
| * | | | | | shada: Fix some memory leaks and completely ignore numbered mark namesZyX2018-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems: - In two places in shada_read_when_writing() memory just was not freed. Both places were verified to cause test failures. - Numbered marks got assigned incorrect (off-by-one compared to position in the array) numbers in replace_numbered_mark. - It was possible to have non-continuously populated array of numbered marks which messed up code for merging them. (Note about tests: marks with additional data are always compared different when merging, that caused some confusion regarding why test did not work the way I expected.)
| * | | | | | functests: Add test for merging with file with only numeric markZyX2018-04-01
| | | | | | | | | | | | | | | | | | | | | Known to cause memory leak, but not an expected crash.
| * | | | | | test/helpers: Support booleansZyX2018-03-27
| | | | | | |
| * | | | | | functests: Fix existing functional testsZyX2018-03-27
| | | | | | |
* | | | | | | msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
| |/ / / / / |/| | | | |
* | | | | | Merge branch 'master' into yagebu/option-fixesJames McCoy2018-03-28
|\ \ \ \ \ \
| * \ \ \ \ \ Merge #8183 'build/msvc: Fix functional tests'Justin M. Keyes2018-03-27
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSBuild still returns a non-zero exit code because it detects the word "error" in the stdout which is caused by some of the test names such as api/buf {get,set,del}_line get_line : out-of-bounds is an error. CMake mailing list thread: https://cmake.org/pipermail/cmake-developers/2015-October/026775.html There isn't any good solution for it, so I modified the build script to detect the error message printed by RunTests.cmake.
| | * | | | | | build/msvc: Fix check for cksum on Windowsb-r-o-c-k2018-03-26
| | |/ / / / /
| * / / / / / TUI: implement "standout" attribute #8081Nimit Bhardwaj2018-03-27
| |/ / / / / | | | | | | | | | | | | | | | | | | closes #8054
| * / / / / *: Make sure that !did_throw implies !current_exceptionZyX2018-03-25
| |/ / / / | | | | | | | | | | | | | | | Fixes #7876
| * | | | test: lua test for vim-patch:8.0.0184Nimit Bhardwaj2018-03-24
| | | | | | | | | | | | | | | | | | | | https://github.com/vim/vim/commit/2b7bc567b9238aaac682236cb4f727d0376e1302
| * | | | win: defaults: 'shellcmdflag', 'shellxquote' #7343Jan Edmund Lazo2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #7698 Wrapping a command in double-quotes allows cmd.exe to safely dequote the entire command as if the user entered the entire command in an interactive prompt. This reduces the need to escape nested and uneven double quotes. The `/s` flag of cmd.exe makes the behaviour more reliable: :set shellcmdflag=/s\ /c Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to cmd.exe `echo` builtin) even if it is wrapped in double quotes. Example: :: internal echo > cmd /s /c " echo foo\:bar" " foo\:bar" :: cygwin echo.exe > cmd /s /c " "echo" foo\:bar" " foo:bar
| * | | | Merge #4419 'implement <Cmd> key'Justin M. Keyes2018-03-24
| |\ \ \ \
| | * | | | getchar: implement <Cmd> key to invoke command in any modeBjörn Linse2018-03-23
| | | | | |
| * | | | | refactor/rename: path_try_shorten_fname()Justin M. Keyes2018-03-24
| | | | | |
| * | | | | refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
| | | | | |
| * | | | | provider/RPC: apply_autocmds_group(): fix double-freeJustin M. Keyes2018-03-24
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During provider dispatch, eval_call_provider() saves global state--including pointers, such as `autocmd_fname`--into `provider_caller_scope` which is later restored by f_rpcrequest(). But `autocmd_fname` is special-cased in eval_vars(), for performance (see Vim patch 7.2.021; this is also the singular purpose of the `autocmd_fname_full` global. Yay!) If eval_vars() frees `autocmd_fname` then its provider-RPC-scoped alias becomes a problem. Solution: Don't free autocmd_fname in eval_vars(), just copy into it. closes #5245 closes #5617 Reference ------------------------------------------------------------------------ Vim patch 7.2.021 https://github.com/vim/vim/commit/f6dad43c98f47da1ff9d8c99b320fc3674f83c63 Problem: When executing autocommands getting the full file name may be slow. (David Kotchan) Solution: Postpone calling FullName_save() until autocmd_fname is used. vim_dev discussion (2008): "Problem with CursorMoved AutoCommand when Editing Files on a Remote WIndows Share" https://groups.google.com/d/msg/vim_dev/kj95weZa_eE/GTgj4aq5sIgJ
| * | | | test/win: use cmd.exe for testJustin M. Keyes2018-03-18
| | | | | | | | | | | | | | | | | | | | Can revert this after #8120.
| * | | | test: jobstop() kills entire process treeJustin M. Keyes2018-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | Test correctly fails before 8d90171f8be6. ref #6530
| * | | | 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: use luv.now() instead of os.time()Justin M. Keyes2018-03-16
| | | | |
| * | | | DirChanged: support <buffer> (#8140)Marco Hinz2018-03-16
| | |_|/ | |/| |