aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
Commit message (Collapse)AuthorAge
* test: fix running functional tests under gdbserverShreyansh Chouhan2021-09-20
| | | | | | | | | | | It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
* refactor(tests): remove redir_exec #15718Justin M. Keyes2021-09-19
| | | | | | | | | | | Problem - `redir_exec` is obsolete, but it keeps getting used in new tests because people copy existing tests. - Disadvantages of `redir_exec`: - Captures extra junk before the actual error/message that we _want_ to test. - Does not fail on error, unlike e.g. `command()`. Solution - Use new functions like `nvim_exec` and `pcall_err`.
* docs: make Lua docstrings consistent #15255Gregory Anders2021-08-22
| | | | | | | | | | | | The official developer documentation in in :h dev-lua-doc specifies to use "--@" for special/magic tokens. However, this format is not consistent with EmmyLua notation (used by some Lua language servers) nor with the C version of the magic docstring tokens which use three comment characters. Further, the code base is currently split between usage of "--@", "---@", and "--- @". In an effort to remain consistent, change all Lua magic tokens to use "---@" and update the developer documentation accordingly.
* feat(defaults): set nojoinspacesGregory Anders2021-08-17
|
* feat: defaults: set undo points in <C-U> and <C-W> (#15400)Gregory Anders2021-08-16
|
* feat(defaults): map CTRL-L to search highlights, update diffs #15385Gregory Anders2021-08-16
|
* feat(defaults): map Y to y$ #13268Matthieu Coudron2021-08-15
| | | | | | | | | rationale: - consistent with D and Y - long recommended by Vim's own ":help Y" close #13268 close #416 ref #6289
* doc(options): Fix recommended PowerShell config (#14349)Dimitri Tcaciuc2021-07-02
| | | | | | | | | | | Ensure that * Shell uses UTF8 input/output mode * Stderr output is captured, in UTF8 * Program exit codes are correctly captured Update functional test harness and add tests for :make command. Closes #13713
* Refactor(tests): Use os commands in mkdir_p helpershadmansaleh2021-06-30
|
* feat(startup): Source runtime/plugin/**/*.lua at startupshadmansaleh2021-06-11
| | | | | | For opt plugins these files are sourced on `:packadd` * `:runtime` Now can exexute lua files
* tests: make treesitter its own categoryBjörn Linse2021-01-03
|
* ex_getln: add secret charmBjörn Linse2020-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in to this secret world using set wildchar=0 " already the default, but remove if non-zero existing config: set wildcharm=0 now you can map 'wildmode' just like any mode: cnoremap <tab> <c-z> function! Spacey() return getcmdline()[-1:] == "/" ? "\<bs>" : "" endfunc cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/" Possibly asked questions: What about backwards compatibility? ==== Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working. Doesn't `<c-z>` mean suspend? ==== Not in cmdline mode. If it would then the recommended wildcharm would not have been `<c-z>` to start with. My config relies on `:<c-z>` being a synonym to `:<nop>`! ==== just no.
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* 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