aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
Commit message (Collapse)AuthorAge
...
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* api: multiple decoration providers at onceBjörn Linse2020-10-10
|
* provider: align all foo#Detect() functions #12839Justin M. Keyes2020-09-05
| | | | | | Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair which means callers must special-case them. Solution: align their return signatures with the perl/pythonx providers.
* healtcheck: use g:perl_host_prog if its set insteadJacques Germishuys2020-09-05
| | | | | | using just 'perl' isn't correct as it may not be the version requested. ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest perl version
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* mksession: always unix slashes "/" for filepathsJustin M. Keyes2020-01-26
|
* provider/perl: add basic testsJan Edmund Lazo2020-01-20
|
* WinClosed: sort auevents.lua; improve testsJustin M. Keyes2020-01-18
| | | | | - test: reduce verbosity, condense redundancy, improve readability - auevents.lua: keep events sorted by name. ref afd1d412fa91
* test: hoist buf_lines()Justin M. Keyes2020-01-08
|
* ci: test powershell core on LinuxJan Edmund Lazo2019-12-31
|
* Merge pull request #7202 from teto/jobstart_envJames McCoy2019-12-13
|\ | | | | [RFC] override environment for jobstart
| * test: always pass a string to expect_msg_seqMatthieu Coudron2019-12-03
| | | | | | | | Seems like pcall doesn't always return a string as a 2nd element of the tuple.
* | defaults: set nostartofline (#11135)Justin M. Keyes2019-12-03
|\ \ | |/ |/| | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
| * defaults: set nostartoflineMatthieu Coudron2019-12-03
| | | | | | | | | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
* | API: rename nvim_execute_lua => nvim_exec_luaJustin M. Keyes2019-12-02
|/ | | | | | - We already find ourselves renaming nvim_execute_lua in tests and scripts, which suggests "exec" is the verb we actually want. - Add "exec" verb to `:help dev-api`.
* build/doc/CI: remove/update quickbuild references #11258Justin M. Keyes2019-10-19
|
* test/functional: retry/Screen: failure instead of error #11173Daniel Hahler2019-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Running out of retries, or unexpected screen state should make the test FAIL, not ERROR. - Uses levels to report the location of the caller. - Improve message with retry-failure (formatting). Before: [ RUN ] test: 103.53 ms ERR test/functional/helpers.lua:388: retry() attempts: 1 test/functional/ui/screen.lua:587: Row 1 did not match. Expected: |*X^ | |{0:~ }| |{0:~ }| | | Actual: |*^ | |{0:~ }| |{0:~ }| | | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/helpers.lua:388: in function 'retry' test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23> After: [ RUN ] test: 105.22 ms FAIL test/functional/test_spec.lua:24: stopping after 1 retry() attempts. test/functional/test_spec.lua:25: Row 1 did not match. Expected: |*X^ | |{0:~ }| |{0:~ }| | | Actual: |*^ | |{0:~ }| |{0:~ }| | | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/helpers.lua:389: in function 'retry' test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
* test: "!:&" works with powershell #11201Jan Edmund Lazo2019-10-10
| | | Removed 'echo' alias because it does not behave like POSIX echo.
* doc: update shellquote for powershell #11122Jan Edmund Lazo2019-10-10
| | | shellquote is not treated like shellxquote for non-quote values.
* tests/functional: keep $TMPDIR in env (#11163)Daniel Hahler2019-10-06
|
* screen: don't crash on invalid grid cells being recomposedBjörn Linse2019-09-30
|
* Context: rename "buflist" => "bufs"Justin M. Keyes2019-09-14
| | | | | Given the other type names "jumps", "vars", etc., the name "buflist" is somewhat unintuitive.
* tests: fix system_spec when run with clipboard manager (#10956)Daniel Hahler2019-09-12
| | | | | | | | | * tests: move os_kill to functional helpers * tests: fix system_spec when run with clipboard manager Replaces "xclip" with a dedicated helper program. Fixes: https://github.com/neovim/neovim/issues/4900#issuecomment-501866842
* update tests for new resize behavior (resize at pager, but not at :!cmd)Björn Linse2019-09-08
|
* 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.
* tests: do_rmdir(): improve error handling #10955Daniel Hahler2019-09-06
|
* 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.
* test/uname(): always lowercaseJustin M. Keyes2019-09-01
|
* screen.lua: dump payload on handler failureJustin M. Keyes2019-09-01
| | | | | | | | | | | | For debugging failures like: test/functional/helpers.lua:240: test/functional/ui/screen.lua:898: bad argument #1 to 'unpack' (table expected, got number) test/functional/helpers.lua:240: test/functional/ui/screen.lua:708: attempt to index local 'item' (a number value) ref #10804
* test: assert_alive()Justin M. Keyes2019-09-01
|
* tests: use runtime from build for doc/tags with :help (#10479)Daniel Hahler2019-08-28
| | | | | | | | | | | | This is better practice in general, and allows to remove the "helptags ALL" hacks. Ref: https://github.com/neovim/neovim/issues/8824 Ref: https://github.com/neovim/neovim/commit/f1b67c3453c * Makefile: fix dependencies with regard to helptags - use the file as the main target to avoid unnecessary triggering - use "make oldtest" on Travis to ensure it gets built
* test/functional/helpers.lua: env: forward also TSAN_OPTIONS/MSAN_OPTIONSDaniel Hahler2019-08-21
|
* tests/functional: expect_msg_seq: use load_adjust (#10727)Daniel Hahler2019-08-09
| | | | | | | | | | | | | | | | | | | Regardless of the comment "Big timeout for ASAN/valgrind" it would use 10s by default already. This changes it to use `load_adjust`, which itself is only computed on CI now, and outside of any tests - since it has side effects when being used the first time! The failure seen on AppVeyor: [ RUN ] jobs can get the pid value using getpid: ERR test\functional\helpers.lua:167: ============================================================================== got 0 messages (ignored 0), expected 1 stack traceback: test\functional\helpers.lua:167: in function 'expect_msg_seq' test/functional\core\job_spec.lua:288: in function <test/functional\core\job_spec.lua:281> Log: https://ci.appveyor.com/project/neovim/neovim/builds/26537324/job/y1io66fbx399q7h6?fullLog=true#L6554
* test: Minimize shada/helpers.lua #10728Justin M. Keyes2019-08-09
|
* tests: use module pattern with test/functional/helpers.lua (#10724)Daniel Hahler2019-08-08
|
* API: ContextAbdelhakeem2019-07-27
|
* tests: win: fix "cat" with PowerShellerw72019-07-26
| | | | Ref: https://github.com/neovim/neovim/pull/10580#issuecomment-514884092
* defaults: wildoptions=pum,tagfile #10384Justin M. Keyes2019-07-01
| | | ref #6289
* libluv: use luv_set_callback to control callback executionBjörn Linse2019-06-30
| | | | | Disable the use of deferred API functions in a fast lua callback Correctly display error messages from a fast lua callback
* ci: AppVeyor: fix cov job, remove duplicate non-cov one (#10217)Daniel Hahler2019-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ci: AppVeyor: set GCOV_ERROR_FILE This prevents the warnings/errors to be spilled into test results, causing them to fail them, e.g.: [ FAILED ] C:/projects/neovim/test/functional\core\main_spec.lua @ 97: Command-line option -s errors out when trying to use nonexistent file with -s C:/projects/neovim/test/functional\core\main_spec.lua:98: Expected objects to be the same. Passed in: (string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory profiling:C:\projects\neovim\build/src/nvim/CMakeFiles/nvim.dir/buffer.c.gcda:Data file mismatch - some data files may have been concurrently updated without locking support ' Expected: (string) 'Cannot open for reading: "Xtest-functional-core-main-s.nonexistent": no such file or directory ' stack traceback: C:/projects/neovim/test/functional\core\main_spec.lua:98: in function <C:/projects/neovim/test/functional\core\main_spec.lua:97> For reference, the locking appears to have been reworked for gcc 9.1 [1]. 1: https://github.com/gcc-mirror/gcc/commit/56621355b helpers.clear: keep GCOV_ERROR_FILE in environment * ci: AppVeyor: remove MINGW_64 config (used with cov now) Also: - run MINGW_64-gcov first, and with PRs, since it provides coverage.
* defaults: exclude "S" from 'shortmess' #10136Justin M. Keyes2019-06-07
| | | ref #6289
* messages: use proper multiline error message for rpcrequest and API wrappersBjörn Linse2019-05-26
|
* 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.
* test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* test: share implementation of testdir/load.vimJustin M. Keyes2019-05-18
| | | | | | | Also, don't compute load factor unless load_adjust() was called, it slows down the test suite. ref #9292
* 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')
* terminal: swap priority of terminal, editor highlightsJustin M. Keyes2019-05-02
| | | | closes #9964
* test: clear(): remove `opts.headless` parameterJustin M. Keyes2019-04-27
| | | | | | | Callers can instead specify `args_rm={'--headless'}`. TODO: should `nvim_argv` have "--headless" by default? Need to inspect some uses of spawn(nvim_argv) ...
* test: clear(): `args_rm` parameterJustin M. Keyes2019-04-27
|