aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval
Commit message (Collapse)AuthorAge
* tests: fix "system() … prints verbose information" (#10532)Daniel Hahler2019-07-17
| | | | | | | | It would previously fail with `set shell=sh` (no slash). For the test itself we can just use a non-existing (fake) shell, because it is only about the verbose output. Ref: https://github.com/neovim/neovim/issues/9330
* viml/profile: revert proftime_T to unsigned type #10521Justin M. Keyes2019-07-16
| | | | | | | | | | | | | | - reltimestr(): Produce negative value by comparing the unsigned proftime_T value to INT64_MAX. https://github.com/neovim/neovim/issues/10452#issuecomment-511155132 1. The interfaces of nearly all platforms return uint64_t. INT64_MAX is only half of that. 2. Low-level interfaces like this typically define that there is no fixed starting point. The only guarantees are that it's (a) monotonically increasing at a rate that (b) matches real time. ref 06af88cd72ea fix #10452
* Fix is_executable_in_path() on Windows (#10468)erw72019-07-15
| | | | | | | | * Fix problem that 1byte extra memory was allocated in is_executable_in_path * Revert "Revert "tests: executable_spec: enable pending test #10443" (#10454)" This reverts commit 13fbeda0e56db36aeeb865bb5b33d13f69b2fdbc.
* viml/reltime(): allow negative result #10453Justin M. Keyes2019-07-09
| | | | | | - define proftime_T as signed integer - profile_sub(): allow negative result closes #10452
* Revert "tests: executable_spec: enable pending test #10443" (#10454)Daniel Hahler2019-07-09
| | | This reverts commit b53c483a4a6db91aad621d5f404cc6e930b434de.
* CI: improve gcov handling #10404Daniel Hahler2019-07-07
| | | | | | | | | - Move __gcov_flush to process_spawn, for more reliable coverage tracking of subprocesses - Travis: use GCOV_ERROR_FILE - codecov: use "-X fix" to skip "fixing" uploaded coverage data; it should be handled by codecov's backend instead. - AppVeyor: no $PATH mangling, which breaks with the improved coverage tracking due to missing .dll in PATH.
* tests: executable_spec: enable pending test #10443Daniel Hahler2019-07-07
| | | Should hopefully work now after efc6d9951b.
* tests: executable_spec: keep assertion (#10408)Daniel Hahler2019-07-03
| | | | It was moved to become pending in 18127f64c, but the assertion should be kept.
* tests: fix flaky "timers can be stopped from the handler" (#10364)Daniel Hahler2019-06-29
| | | | | | | | | | | | Seen on Travis (osx): [ RUN ] timers can be stopped from the handler: FAIL .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same. Passed in: (number) 2 Expected: (number) 3 stack traceback: .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>
* eval/api: don't allow the API to be called in the sandbox.Björn Linse2019-06-26
| | | | | Identifying and maintaining a "secure" subset of the API would be too much busywork. So just disable the entire thing.
* tests: increase timeout with "timers doesn't mess up the cmdline" (#10212)Daniel Hahler2019-06-13
| | | | | | | | | | | | This might be required on (slower) CI. [ RUN ] timers doesn't mess up the cmdline: ERR test/functional/ui/screen.lua:562: expected intermediate screen state before final screen state stack traceback: test/functional/ui/screen.lua:562: in function '_wait' test/functional/ui/screen.lua:366: in function 'expect' .../build/neovim/neovim/test/functional/eval/timer_spec.lua:221: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:199> Ref: https://travis-ci.org/neovim/neovim/jobs/544974506#L3861
* functionaltests: fix new execute() testsJan Edmund Lazo2019-06-03
|
* update functional test for "places cursor correctly #6035"Sha Liu2019-06-03
|
* UI: Fix wrong msg_col after execute()Sha Liu2019-06-03
| | | | | closes #6035 closes #9250
* messages: use proper multiline error message for rpcrequest and API wrappersBjörn Linse2019-05-26
|
* 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/channels_spec: cleanupJustin M. Keyes2019-05-12
| | | | | - Remove stray print() - Use uname() instead of system('uname')
* test: "$PATHEXT=::"Justin M. Keyes2019-04-02
|
* test/win: Remove unnecessary set shellerw72019-04-01
|
* test/win: executable(), exepath() #9516erw72019-04-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>
* os_getenv, os_setenv: revert "widechar" implJustin M. Keyes2019-02-26
| | | | | | | | | | It's reported that the Windows widechar variants do automatically convert from the current codepage to UTF16, which is very helpful. So the "widechar" impls are a good direction. But libuv v1.12 does that for us, so the next commit will use that instead. ref #8398 ref #9267
* os_setenv: use _wputenv_s; remove vestigial code #7920Justin M. Keyes2019-02-25
| | | | | _putenv_s variant was left over from 810d31a43001, should have been removed in cd5b1315757e.
* test: adjust timer_specJustin M. Keyes2019-01-31
|
* tests: load-adjust timer tests (functionaltest)Marco Hinz2019-01-17
|
* VimL/confirm(): Show dialog even if :silentJustin M. Keyes2018-12-01
| | | | | closes #8788 related #9034
* test: adjust time-sensitive tests (#9220)Justin M. Keyes2018-11-10
| | | | | | | | | | | | | - window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so that it follows output. - inccommand_spec.lua: Increase timeout to allow 2nd retry. - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms.
* test/timer_spec: relax lower-boundJustin M. Keyes2018-11-05
| | | | | | | | | | | | | Test is unreliable on macOS 10.13. The lower-bound isn't central to the purpose of the test, so just relax it. ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms. related: #6829
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* test: adjust timer testsJustin M. Keyes2018-10-13
| | | | | Timer tests are less reliable on Travis CI macOS 10.12 (most egregious). Also somewhat on 10.13.
* shell/logging: Fix E730 with verbose system({List}) #9009Justin M. Keyes2018-09-21
| | | | | | | | ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790 Steps to reproduce: :set verbose=9 :call system(['echo']) E730: using List as a String
* test: system_spec: remove redundant clear()Justin M. Keyes2018-09-19
|
* tests: call getchar(1) in timer callbackJan Edmund Lazo2018-09-04
| | | | Test changes from 8.0.1020 and 8.0.1048.
* 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.
* Make "v:errmsg", "v:shell_error" and "v:this_session" distinctShougo Matsushita2018-07-23
|
* test: update writefile test for invalid list itemsJan Edmund Lazo2018-06-24
| | | | | | It validates list items with tv_check_str_on_nr() to catch invalid types (ex. E745, E805). If there is an invalid item, it does not write to the file.
* vim-patch:8.0.0609: some people still don't know how to quit (#8571)Jan Edmund Lazo2018-06-17
| | | | | | | | Problem: For some people the hint about quitting is not sufficient. Solution: Put <Enter> separately. Also use ":qa!" to get out even when there are changes. https://github.com/vim/vim/commit/28a8193e3113f676f89fb6312b099d849df881d3
* vim-patch:8.0.0256: missing changes to one file breaks testJan Edmund Lazo2018-06-07
| | | | | | Problem: Tests fail because some changes were not included. Solution: Add changes to evalfunc.c https://github.com/vim/vim/commit/3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3
* test: API: fix tests after improved error captureJustin M. Keyes2018-05-10
|
* API: return non-generic VimL errorsJustin M. Keyes2018-05-09
| | | | | | | | | | - Return VimL errors instead of generic errors for: - nvim_call_function - nvim_call_dict_function - Fix tests which were silently broken before this change. This violates #6150 where we agreed not to translate API errors. But that can be fixed later.
* Merge #8218 'Fix errors reported by PVS'Justin M. Keyes2018-04-27
|\ | | | | closes #4983
| * functests: Fix testlint errorsZyX2018-04-22
| |
| * eval: Silence PVS/V547: E882 may be triggeredZyX2018-04-15
| | | | | | | | | | | | | | | | | | | | I failed to deduce why analyzer thinks E882 may not be triggered, though conditions for triggering it are strange: it would trigger E882 only in the single case “function returned non-number”. Cases “function thrown exception”, or “built-in sorter encountered error” will neither yield E882 nor stop sort()/uniq(). Note though that searching test code revealed that neither E702 nor E882 are not tested anywhere.
* | test: win: use "start" to test backgrounded job (#8171)Jan Edmund Lazo2018-04-15
| |
* | server: init v:servername if $NVIM_LISTEN_ADDRESS is invalidJustin M. Keyes2018-04-11
| | | | | | | | | | Before this change, if $NVIM_LISTEN_ADDRESS was invalid, v:servername was left empty.
* | server: introduce --listen, deprecate $NVIM_LISTEN_ADDRESSJustin M. Keyes2018-04-11
| |
* | serverstop(): return FALSE for invalid addressJustin M. Keyes2018-04-11
|/
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* win: defaults: 'shellcmdflag', 'shellxquote' #7343Jan Edmund Lazo2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | closes #7698 Wrapping a command in double-quotes allows cmd.exe to safely dequote the entire command as if the user entered the entire command in an interactive prompt. This reduces the need to escape nested and uneven double quotes. The `/s` flag of cmd.exe makes the behaviour more reliable: :set shellcmdflag=/s\ /c Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to cmd.exe `echo` builtin) even if it is wrapped in double quotes. Example: :: internal echo > cmd /s /c " echo foo\:bar" " foo\:bar" :: cygwin echo.exe > cmd /s /c " "echo" foo\:bar" " foo:bar