aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
Commit message (Collapse)AuthorAge
...
* lua: make vim.inspect available early so it can be used for path debuggingBjörn Linse2020-11-05
|
* test/vim.validate(): assert normalized stacktraceJustin M. Keyes2020-10-05
| | | | | | | - The previous commit lost information in the tests. Instead, add some more "normalization" substitutions in pcall_err(), so that the general shape of the stacktrace is included in the asserted text. - Eliminate contains(), it is redundant with matches()
* vim.validate(): include stacktrace in messageTJ DeVries2020-10-05
|
* lua/check_cores(): check uname instead of TRAVIS_OS_NAMEJustin M. Keyes2020-09-12
|
* fix(bytetrack): send correct events when opening linesThomas Vigouroux2020-09-11
| | | | | | | | | | | | a bit of test cleanup ärrår feeel SPLIT fix: sned correct updates on <CR>
* test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is setJames McCoy2020-09-06
|
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* test: always dump logs on failure #11886Justin M. Keyes2020-02-16
| | | | | Whenever `eq()`, `ok()`, etc. fails, include log tail in the failure message. This helps to correlate log messages with a particular test failure.
* test/LSP: assert contents of log fileJustin M. Keyes2020-02-16
|
* test/LSP: dump logs on errorJustin M. Keyes2020-02-16
| | | | | | This will help debug CI flakey failures. TODO: helpers.assert_log() -- Explicitly check contents of the logfile.
* Lua: vim.env, vim.{g,v,w,bo,wo} #11442Ashkan Kiani2019-11-24
| | | | | | | | - Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo} - Redo gen_char_blob to generate multiple blobs instead of just one so that multiple Lua modules can be inlined. - Reorder vim.lua inclusion so that it can use previously defined C functions and utility functions like vim.shared and vim.inspect things. - Inline shared.lua into nvim, but also keep it available in runtime.
* test/pcall_err(): truncate full paths, omit linenrJustin M. Keyes2019-10-26
| | | | ref #11271
* build/doc/CI: remove/update quickbuild references #11258Justin M. Keyes2019-10-19
|
* build: add support for building for FreeBSD under Sourcehut [skip ci]John Szakmeister2019-09-25
|
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
* test: is_os() #10933Justin M. Keyes2019-09-04
| | | | | - Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
* 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
| |