aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval
Commit message (Collapse)AuthorAge
...
* eval: wait(): always spin up dummy-timer #10990Justin M. Keyes2019-09-11
| | | | This avoids getting "stuck". If user actually _wants_ to get stuck forever, they could use `:sleep` or specify a really big `interval`.
* 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.
* Change test because maparg was changed to also return lnumerw72019-09-04
|
* shada/context: fully remove jumplist duplicates #10898Abdelhakeem Osama2019-09-03
| | | | | | | | | | | | | | | | - Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
* test: "can have two timers": retry()Justin M. Keyes2019-09-01
| | | | ref #10768
* API: make nvim_win_set_option() set window-global, not buffer-local #9110Björn Linse2019-09-01
| | | | | | NB: the `!(flags & SOPT_GLOBAL)` exception is for 'statusline'. Because `:set statusline=...` sets the global value for _all_ windows, `:setlocal` is the best we can do there. This is a one-of-a-kind option that doesn't work like any other option.
* fixup! eval: add wait() testAbdelhakeem2019-09-01
|
* eval: add wait() testAbdelhakeem2019-09-01
|
* test/ui: update tests for new msg_grid implementationBjörn Linse2019-09-01
|
* timer_spec: shorter timeout with "doesn't mess up the cmdline" (#10769)Daniel Hahler2019-08-26
| | | | | It was increased in dd21cd2a4 to avoid flakiness, but takes 1s then always. This specifies a shorter timeout again, uisng `load_adjust`.
* 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>
* tests: timer_spec: lower timeout, avoids flakinessDaniel Hahler2019-08-20
| | | | | | | | | | | | | | | | | | | Inspired by quickbuild failure, where `g:val` was increased already: 20:07:04,227 INFO - not ok 1164 - timers works with repeat two 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua @ 36 20:07:04,227 INFO - # Failure message: test/functional/eval/timer_spec.lua:38: Expected objects to be the same. 20:07:04,227 INFO - # Passed in: 20:07:04,227 INFO - # (number) 1 20:07:04,227 INFO - # Expected: 20:07:04,227 INFO - # (number) 0 20:07:04,227 INFO - # stack traceback: 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua:38: in function <test/functional/eval/timer_spec.lua:36> Uses a pattern of `eq()`ing `timer_start` and `g:val` in the same `eval` call, and decreases timeouts in general. Improves runtime from ~5s to <2s.
* tests: use larger timeout with "timers can be stopped from the handler" (#10760)Daniel Hahler2019-08-14
| | | | | | | | | | | | | | | | Seen on quickbuild: 23:01:01,289 INFO - not ok 1172 - timers can be stopped from the handler 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua @ 154 23:01:01,289 INFO - # Failure message: test/functional/eval/timer_spec.lua:166: Expected objects to be the same. 23:01:01,289 INFO - # Passed in: 23:01:01,289 INFO - # (number) 3 23:01:01,289 INFO - # Expected: 23:01:01,289 INFO - # (number) 0 23:01:01,289 INFO - # stack traceback: 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua:166: in function <test/functional/eval/timer_spec.lua:154> Log: http://neovim-qb.szakmeister.net/build/24288 Ref: https://github.com/neovim/neovim/pull/10364
* win/os_env_exists(): workaround libuv bug #10734Justin M. Keyes2019-08-10
| | | | | | | | | | os_env_exists() fails on MSVC build: os_env_exists:104: uv_os_getenv(EMPTY_VAR) failed: -4094 UNKNOWN - Revert 396a3945c4eba733b3a99a7ded217af83a400791 - HACK: Windows: return TRUE if uv_os_getenv() returns UV_UNKNOWN, until libuv bug is fixed: https://github.com/libuv/libuv/issues/2413 ref https://github.com/neovim/neovim/commit/396a3945c4eba733b3a99a7ded217af83a400791#r34642361
* test/environ_spec: Windows treats empty as undefinedJustin M. Keyes2019-08-10
| | | | ref #10657
* exists(): return false for empty env var #10657Daniel Hahler2019-08-09
| | | | | Fixes https://github.com/neovim/neovim/issues/3266 close #10657
* f_environ: cleanup/refactorDaniel Hahler2019-08-06
| | | | | - use os_getenvname_at_index / os_getenv - f_getenv: empty (*p == NUL) is not null (undefined)
* vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusingJan Edmund Lazo2019-07-28
| | | | | | | | | | | | | | | | | | Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163) https://github.com/vim/vim/commit/a84a3dd6635fcd2e07f510cba6a999585dcc381a vim-patch:8.1.1052: test for CTRL-C message sometimes fails Problem: test for CTRL-C message sometimes fails Solution: Make sure there are no changed buffers. https://github.com/vim/vim/commit/553e5a5c568e7d175b65b0472cd6d9843b25f4c8 vim-patch:8.1.1053: warning for missing return statement Problem: Warning for missing return statement. (Dominique Pelle) Solution: Add return statement. https://github.com/vim/vim/commit/d6c3f1fa2b5e1dd7dc87cf608d72b84ad696b58f
* API: Context: save/restoreAbdelhakeem2019-07-27
|
* eval: context: add ctx-family functionsAbdelhakeem2019-07-27
|
* win: jobstart(), system(): $PATHEXT-resolve exeJustin M. Keyes2019-07-21
| | | | | | | | | | | | Windows: In order for jobstart(['foo']), system(['foo']) to find "foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to process_spawn(). Rationale: jobstart([…]), system([…]) "executable" semantics should be consistent with the VimL executable() function. fix #9569 related: #10554
* reltimefloat(): allow negative result #10544Justin M. Keyes2019-07-20
| | | | | | | | | For "backwards" duration, reltimefloat() should return negative value like its counterpart reltimestr(). ref bab24a88ab48 ref 06af88cd72ea ref #10521 fix #10452
* 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.