aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
Commit message (Collapse)AuthorAge
...
* system(): handle profiling and 'verbose' #8730Marcos Almeida2018-07-29
| | | | | | | | | | | | closes #8362 Vim's code calls `call_shell` directly from `get_system_output_as_rettv` whereas in Nvim this function has been rewritten to not call `call_shell` but to call `os_system` via `do_os_system`, losing the support for profiling and verbose. Changing the code to call `call_shell` from `get_system_output_as_rettv` seems to be too complicated to be worth it on the current version of the code. So this commit duplicates the relevant code.
* cleanup, test interactive -EJustin M. Keyes2018-06-04
|
* test/util: move general functions into global helpersJustin M. Keyes2018-04-27
|
* test/util: throttle retry() (#8296)Justin M. Keyes2018-04-20
| | | | | | Avoid a hot loop in retry(), there's no need to retry more than 50/s. Also use luv.sleep() to implement sleep() instead of spinning the event-loop, so events are not silently discarded.
* test/util: retry(): also decorate non-string errorJustin M. Keyes2018-04-18
|
* Merge #8120 'test: win: prefer cmd.exe'Justin M. Keyes2018-04-15
|\
| * 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.
* | test/util: expect_err() (#8257)Justin M. Keyes2018-04-11
| | | | | | other cleanup, ref #8245
* | test/util: matches()Justin M. Keyes2018-04-11
|/
* test: next_msg(): default `timeout` to 10sJustin M. Keyes2018-03-11
| | | | | | Infinite timeout results in hangs which waste time. If some test needs longer than 10s to wait for a message, it should specify the timeout explicitly.
* test: rename next_message() to next_msg()Justin M. Keyes2018-03-11
|
* test: enable ex_cmds/cd_spec.lua on WindowsJan Edmund Lazo2018-02-19
|
* test/util: remove eq_any()Justin M. Keyes2018-02-18
| | | | | | It was added in the parent commit, but ended up not being used. And I can't think of a case where it will be used: instead we would probably want to generalize expect_msg_seq() if necessary.
* test/util: expect_msg_seq()Justin M. Keyes2018-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | job_spec.lua on AppVeyor (Windows) often fails like this: FAILED ] C:/projects/neovim/test/functional\core\job_spec.lua @ 72: jobs changes to given `cwd` directory C:/projects/neovim/test/functional\core\job_spec.lua:81: Expected objects to be the same. Passed in: (table) { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'C:\projects\neovim\Xtest-tmpdir\nvimmSjq1S\0' } } } Expected: (table) { [1] = 'notification' [2] = 'stdout' *[3] = { [1] = 0 *[2] = { [1] = 'C:\projects\neovim\Xtest-tmpdir\nvimmSjq1S\0' *[2] = '' } } } stack traceback: Message chunking is non-deterministic, so we need to try different variants.
* test/win: fix some environment assumptions #7912George Zhao2018-01-28
| | | | | fix #7909 fix #7910
* 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
* test: set_shell_powershell(): update flags (#7819)Justin M. Keyes2018-01-07
|
* ci: nodejs client acceptance-test #7706Jan Edmund Lazo2017-12-17
| | | | | | | | | | | | | | | | | | | | | | | | ci: install nodejs 8 in Appveyor, Travis provider: check node version for debug support Resolve https://github.com/neovim/neovim/pull/7577#issuecomment-350590592 for Unix. provider: test if nodejs in ci supports --inspect-brk nodejs host for neovim requires nodejs 6+ to work properly. nodejs 6.12+ or 7.6+ is required for debug support via `node --inspect-brk`. provider: run cli.js of nodejs host directly npm shims are useless because the user cannot set node to debug mode via --inspect-brk. This is problematic on Windows which use batchfiles and shell scripts to compensate for not supporting shebang. The patch uses `npm root -g` to get the absolute path of the global npm modules. If that fails, then the user did not install neovim npm package globally. Use that absolute path to find `neovim/bin/cli.js`, which is what the npm shim actually runs with node. glob() is for a simple file check in case bin/ is removed because the npm shims are ignored now.
* test: write_file(): support append-modeJustin M. Keyes2017-12-05
|
* test: retry(): fix time calculationJustin M. Keyes2017-12-05
| | | | | libuv caches the results of uv.now() until the next loop tick. If a test does not spin the libuv event loop, retry() enters an infinite cycle.
* tui: expose terminal type in 'term' optionJustin M. Keyes2017-11-27
| | | | | | | | | | Since "builtin" terminfo definitions were implemented (7cbf52db1bdf), the decisions made by tui.c and terminfo.c are more relevant. Exposing that decision in the 'term' option helps with troubleshooting. Also: remove code that allowed setting t_Co. `:set t_Co=…` has never worked; the highlight_spec test asserting that nvim_set_option('t_Co') _does_ work makes no sense, and should not have worked.
* channels: testsBjörn Linse2017-11-26
|
* test: add hexdump utilitiy functionBjörn Linse2017-11-25
|
* test/helpers: disable powershell logo/banner messageJustin M. Keyes2017-08-06
|
* Merge #6958 from ZyX-I/fix-6957Justin M. Keyes2017-07-04
|\
| * shada: Make sure that code does not attempt to read too long itemsZyX2017-07-04
| | | | | | Fixes #6957
* | functests: Ensure different SIDs on successive source() callsZyX2017-07-04
|/
* Merge #6789 from ZyX-I/lua-pathJustin M. Keyes2017-06-27
|\ | | | | lua: Add paths from &runtimepath to package.path and package.cpath
| * lua: Add paths from &runtimepath to package.path and package.cpathZyX2017-05-25
| |
* | functests: Refactor redir_execZyX2017-06-20
| |
* | test: iswin(): detect without nvim sessionJustin M. Keyes2017-06-07
| |
* | channels: implement sockopen() to connect to socketBjörn Linse2017-05-29
|/ | | | Helped-By: oni-link <knil.ino@gmail.com>
* functests: Replace check_provider -> missing_provider with err reportZyX2017-05-13
|
* functests: Test invalid behaviourZyX2017-05-13
| | | | Test correctly fail for oneline ruby, python and python3.
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|\
| * api: nvim_get_mode()Justin M. Keyes2017-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asynchronous API functions are served immediately, which means pending input could change the state of Nvim shortly after an async API function result is returned. nvim_get_mode() is different: - If RPCs are known to be blocked, it responds immediately (without flushing the input/event queue) - else it is handled just-in-time before waiting for input, after pending input was processed. This makes the result more reliable (but not perfect). Internally this is handled as a special case, but _semantically_ nothing has changed: API users never know when input flushes, so this internal special-case doesn't violate that. As far as API users are concerned, nvim_get_mode() is just another asynchronous API function. In all cases nvim_get_mode() never blocks for more than the time it takes to flush the input/event queue (~µs). Note: This doesn't address #6166; nvim_get_mode() will provoke #6166 if e.g. `d` is operator-pending. Closes #6159
| * Merge #6539 'More cursor shape modes'Justin M. Keyes2017-04-21
| |\
| | * tests: detect invalid helpers.sleepBjörn Linse2017-04-21
| |/
| * win/test: Enable more system() testsRui Abreu Ferreira2017-04-12
| |
| * test: `:file {name}`Justin M. Keyes2017-04-11
| |
| * test/rmdir(): fallback to Nvim delete()Justin M. Keyes2017-04-11
| | | | | | | | | | | | | | Lua has too many pitfalls here: - os.execute() requires shell-escaping - os.execute() has breaking changes between Lua 5.1 and 5.2 - No native way in Lua to handle "readonly" etc. on Windows
| * test/rmdir(): Remove `readonly` attr on Windows.Justin M. Keyes2017-04-10
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-10
|\|
| * Merge branch 'master' into rename-executeZyX2017-04-09
| |\
| | * test: retry(): Report number of retries. (#6475)Justin M. Keyes2017-04-09
| | | | | | | | | tui_spec.lua: Retry the terminal-mode test.
| * | functests: Fix some tests which are failing locally for unrelated reasonsZyX2017-04-09
| | |
| * | 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.
| * | functests: Refactor legacy/029_join testZyX2017-04-08
| |/
* | Merge branch 'master' into luaviml'/luaZyX2017-04-08
|\|
| * unittests: Add trace description right to the error messageZyX2017-04-01
| |