summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/lua/system_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-20refactor(test): drop deprecated exc_exec #39242Justin M. Keyes1
2025-07-10docs: api, pack, events, developJustin M. Keyes1
2025-07-02fix(vim.system): env=nil passes env=nil to uv.spawnLewis Russell1
731e616a79 made it so passing `{env = nil, clear_env = true }` would pass `{env = {}}` to `vim.uv.spawn`. However this is not what `clear_env` is (arguably) supposed to do. If `env=nil` then that implies the uses wants `vim.uv.spawn()` to use the default environment. Adding `clear_env = true` simply prevents `NVIM` (the base environment) from being added. Fixes #34730
2025-06-25fix(vim.system): clear_env=true gives an invalid env to uv.spawn #33955Birdee1
Problem: In setup_env, some needed logic is bypassed when clear_env=true. Solution: Drop the early return in setup_env(). Co-authored-by: BirdeeHub <birdee@localhost>
2025-05-29fix(vim.system): improve error message when cwd does not existLewis Russell1
Problem: vim.uv.spawn will emit ENOENT for either when the cmd or cwd do not exist and does not tell you which. Solution: If an error occurs, check if cwd was supplied and included in the error message if it does not exist.
2025-04-16fix(vim.system): unclear non-executable message #33455Justin M. Keyes1
Problem: When a command is not found or not executable, the error message gives no indication about what command was actually tried. Solution: Always append the command name to the error message. BEFORE: E5108: Error executing lua …/_system.lua:248: ENOENT: no such file or directory AFTER: E5108: Error executing lua …/_system.lua:249: ENOENT: no such file or directory: "foo" fix #33445
2024-12-05test(system_spec): check for .git dir before using git (#31458)zeertzjq1
2024-12-04fix(vim.system): close pipe handles after process handleLewis Russell1
Fixes #30846
2024-11-21docs: misc (#31138)dundargoc1
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-11-08fix(vim.system): resolve executable paths on windowsLewis Russell1
Fixes #31107
2024-09-21test: support upvalues in exec_luaLewis Russell1
2024-04-23test: improve test conventionsdundargoc1
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.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-02-02fix(vim.system): don't process non-fast events during wait() (#27300)zeertzjq1
Problem: Processing non-fast events during SystemObj:wait() may cause two pieces of code to interfere with each other, and is different from jobwait(). Solution: Don't process non-fast events during SystemObj:wait().
2024-01-03refactor: format test/*Justin M. Keyes1
2023-09-05refactor(vim.system): factor out on_exit handlingLewis Russell1
2023-09-05fix(vim.system): make timeout work properlyLewis Russell1
Mimic the behaviour of timeout(1) from coreutils.
2023-09-05fix(vim.system): let on_exit handle cleanup after killLewis Russell1
Fixes #25000
2023-06-07feat(lua): add `vim.system()`Lewis Russell1
feat(lua): add vim.system() Problem: Handling system commands in Lua is tedious and error-prone: - vim.fn.jobstart() is vimscript and comes with all limitations attached to typval. - vim.loop.spawn is too low level Solution: Add vim.system(). Partly inspired by Python's subprocess module Does not expose any libuv objects.