aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
Commit message (Collapse)AuthorAge
...
* 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
| |
| * test: set 'nomore' by default (#6360)Matthew Malcomson2017-03-30
| | | | | | | | | | | | Escaping from a '-- More --' prompt in tests is awkward as it doesn't take keys from the typebuffer, requiring a call to `feed()` in lua at the correct time. Moreover, it's rarer that a test will want the '-- More --' prompt to be activated than not.
| * functests: Fix buf_functions test on WindowsZyX2017-03-29
| |
* | functests: Fix “function has more then 60 upvalues” errorZyX2017-03-27
|/
* defaults: 'showcmd', 'belloff', 'ruler'Justin M. Keyes2017-03-16
| | | | | | | | | | | - Vim "unix default" of 'noshowcmd' is serving few users. And it's inconsistent. - 'ruler' and 'belloff=all' improve the out-of-the-box experience. - Continue to use 'noshowcmd' and 'noruler' by default in the functional tests to keep them fast. TODO: Add a "disable slow stuff" command or mapping to address the use-case of a very slow terminal connection.
* test: Refactor fold tests (#5993)Matthieu Coudron2017-02-28
|
* Merge #6112 from ZyX-I/split-eval'/buf_get_changedtickJustin M. Keyes2017-02-27
|\ | | | | Better b:changedtick support
| * api: Make sure dict_set_var doesn’t edit read-only valuesZyX2017-02-23
| | | | | | Fixes #6147
* | Merge #6111 from ZyX-I/split-eval'/os-fileioJustin M. Keyes2017-02-27
|\ \ | |/ |/| Refactor writefile() and create more tests for it
| * eval: writefile: Give more adequate IO errors and do not call putc()ZyX2017-02-14
| |
* | ci: Better core dump checkingZyX2017-02-14
|/ | | | | | | | | | | | | | | | - Do not exclude any directories from `find` search, remove dumps before tests instead. - Install `apport` on travis so that linux tests should produce core dumps (based on information from travis-ci/travis-ci#3754, not sure whether it still applies). - Check cores in lua so that one has an idea which test is failing exactly. Do this only 10% of time on linux because traversing the file system is slow. Unit tests are still not touched, though it is what `app` argument in `check_cores` is for. TODO? consider using `find`, it may be faster. Consider retiring `os.execute`, dealing with escaping is bad.
* build: `oldtest` target: TEST_FILE, NVIM_PRG (#6098)Justin M. Keyes2017-02-12
| | | | | | | | | | | | | | | | | | | | | | - Add support for TEST_FILE to the `oldtest` target, for consistency with the busted/lua tests. Caveat: with the busted/lua tests TEST_FILE takes a full path, whereas for `oldtest` it must be "test_foo.res". - Add support for NVIM_PRG, again so that all test-related targets are consistent. - Use consistent name for NVIM_PRG. But still need to support NVIM_PROG for QuickBuild CI. Note: The `oldtest` target is driven by the top-level Makefile, because it requires a TTY. CMake 3.2 added a USES_TERMINAL flag to add_custom_target(). But we support CMake 2.8... add_custom_target(oldtest COMMAND make clean COMMAND make NVIM_PRG=$<TARGET_FILE:nvim> $ENV{MAKEOVERRIDES} DEPENDS nvim WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir" USES_TERMINAL true )
* test: helpers.clear(): Set common env vars only if not passed.Justin M. Keyes2017-02-04
|