aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
Commit message (Collapse)AuthorAge
...
* tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler2019-09-03
| | | | | | luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
* test/uname(): always lowercaseJustin M. Keyes2019-09-01
|
* tests: check_logs: improve error message (#10887)Daniel Hahler2019-08-30
| | | | | | | | | Before: [ ERROR ] test/functional/helpers.lua @ 812: after_each test/helpers.lua:156: assertion failed! stack traceback: test/helpers.lua:156: in function 'check_logs' test/functional/helpers.lua:816: in function <test/functional/helpers.lua:812>
* paste: break lines at CR, CRLF #10877Justin M. Keyes2019-08-29
| | | | | | Some terminals helpfully translate \n to \r. fix #10872 ref #10223
* tests: support msg with global_helpers.ok (#10820)Daniel Hahler2019-08-21
| | | | | | Ref: https://github.com/neovim/neovim/pull/10768#discussion_r315904175 Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
* test: isCI(): add "name" parameterJustin M. Keyes2019-08-05
|
* ci: RunTests: ensure that the logfile gets displayed (#10597)Daniel Hahler2019-07-24
| | | | | | This is meant to help with test failures where e.g. `busted` itself might crash or get killed. Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069
* test/helpers: improve pattern with module functions (#10421)Daniel Hahler2019-07-22
| | | | | | Benefits: - less lines, especially less results when grepping - makes it clearer what is exported
* lua/shared: share deepcopy() with test/*Justin M. Keyes2019-05-19
| | | | deepcopy() was duplicated in test/helpers.lua
* lua/shared: move table util funcs to vim.sharedJustin M. Keyes2019-05-18
| | | | | Use `tbl_` prefix for all table-util functions. Specify in the function docstring if it expects a list-like or map-like table.
* lua/stdlib: Introduce vim.sharedJustin M. Keyes2019-05-18
| | | | | | | | | | This is where "pure functions" can live, which can be shared by Nvim and test logic which may not have a running Nvim instance available. If in the future we use Nvim itself as the Lua engine for tests, then these functions could be moved directly onto the `vim` Lua module. closes #6580
* test: Extend {unit,functional}.helpers with global helpersJustin M. Keyes2019-05-18
| | | | | | | | Automatically include all "global helper" util functions in the unit.helpers and functional.helpers and modules. So tests don't need to expicitly do: local global_helpers = require('test.helpers')
* API: emit nvim_error_event on failed async requestJustin M. Keyes2019-04-13
| | | | | We already do this for _invalid_ async requests #9300. Now we also do it for failed invocation of valid requests.
* CI/AppVeyor: per-compiler deps cache #9852Justin M. Keyes2019-04-07
| | | | The deps cache does not work for MSVC builds because the MINGW builds ovewrite it. Cache saves 10+ minutes on the build.
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* test: fix isCI() for QuickbuildJustin M. Keyes2019-03-01
|
* test/env: multibyte env var to child processerw72019-02-28
| | | | | | | | Note: the test fails on non-Windows CI (Travis linux, Quickbuild bsd): even on master before the env.c changes in this patch-series. Maybe the unix part of printenv-test.c needs to be revisited. Signed-off-by: Justin M. Keyes <justinkz@gmail.com>
* test: Lua 5.2/5.3 compatMatěj Cepl2019-01-17
| | | | | close #9515 ref #9280
* multigrid: add multigrid support to test infrastructureBjörn Linse2018-12-31
| | | | make Screen explicitly tied to its session
* test: check_cores(): Fix tmp dir exclusion (#9061)Justin M. Keyes2018-09-28
| | | | | | | | | | | | | tmpdir_get() may be an absolute path, but we invoke glob() with a relative `initial_path`. That can lead to this error: [ ERROR ] test/functional/helpers.lua @ 752: after_each test/helpers.lua:95: cannot open ./Xtest-tmpdir/nvim8jKCjR: No such file or directory stack traceback: test/helpers.lua:95: in function 'glob' test/helpers.lua:273: in function 'check_cores' test/functional/helpers.lua:757: in function <test/functional/helpers.lua:752>
* test: Do not load entire log-file into memoryJustin M. Keyes2018-09-23
| | | | With DEBUG-level logging, after `make test`, log file could be 1+ GB.
* test: Dump $NVIM_LOG_FILE contents (#8926)Justin M. Keyes2018-08-28
| | | | | | Do this at the test-framework level instead of CI (Travis) scripts. Then it works for QuickBuild and AppVeyor. ref eb6dd3e42dc38460e8624dc5faef894e21c6aa26
* tests: introduce screen:expect{...} formBjörn Linse2018-08-27
|
* 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.
* fixup: exclude node_modules/ for crash detectionJan Edmund Lazo2018-06-05
| | | | node.js client uses lodash which has core.js.
* test/util: move general functions into global helpersJustin M. Keyes2018-04-27
|
* Merge branch 'master' into s-dash-stdinb-r-o-c-k2018-04-14
|\
| * test/util: expect_err() (#8257)Justin M. Keyes2018-04-11
| | | | | | other cleanup, ref #8245
| * test/util: matches()Justin M. Keyes2018-04-11
| |
| * test/helpers: Support booleansZyX2018-03-27
| |
| * 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.
| * lintJames McCoy2018-02-03
| |
| * tests: Make format_string('%q', ...) output more stableZyX2018-02-02
| | | | | | It appears to be different on lua and luajit.
| * tests: Fix linter errorsZyX2017-12-03
| |
| * Merge branch 'master' into expression-parserZyX2017-11-26
| |\
| * | tests: Stabilize float format and %e in format_luav and format_stringZyX2017-11-19
| | |
| * | *: Fix linter errorsZyX2017-11-19
| | |
| * | unittests,viml/parser/expressions: Start adding asgn parsing testsZyX2017-11-13
| | |
| * | unittests: Fix automatic test case generationZyX2017-11-13
| | |
| * | *: Fix linter errorsZyX2017-11-06
| | |
| * | unittests: Add tests for vim_str2nrZyX2017-11-06
| | |
| * | tests: Add missing test casesZyX2017-11-06
| | |
| * | api/vim,functests: Add tests for nvim_parse_expression, fix found bugsZyX2017-11-06
| | |
| * | tests: Fix testlint errorsZyX2017-11-06
| | |
| * | viml/parser/expressions,tests: Add AST freeing, with sanity checksZyX2017-10-15
| | |
| * | viml/parser/expressions: Create tests for latest additionsZyX2017-10-15
| | |
| * | viml/parser/expressions: Add support for string parsingZyX2017-10-15
| | |
| * | test/helpers: Add format_string and format_luavZyX2017-09-29
| | | | | | | | | | | | | | | First intended to provide %r functionality like in Python (and also support for %*.*s, but this was not checked), second adds nice table formatting for use in cases similar to screen:snapshot_util().
* | | Merge branch 'master' into s-dash-stdinZyX2017-12-03
|\ \ \ | | |/ | |/|