Problem: Vim tests are slow and flaky at the same time due to reliance
on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
(Yee Cheng Chin)
A lot of Vim tests currently rely on waiting a specific amount of time
before asserting a condition. This is bad because 1) it is slow, as the
timeout is hardcoded, 2) it's unreliable as a resource-starved runner
may overshoot the timeout. Also, there are a lot of builtin sleep
commands in commonly used utilities like VerifyScreenDump and WaitFor()
which leads to a lot of unnecessary idle time.
Fix these issues by doing the following:
1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait
time possible (1 ms). This essentially turns it into a spin wait. On
fast machines, these will finish very quickly. For existing tests
that had an implicit reliance on the old timeouts (e.g.
VerifyScreenDump had a 50ms wait before), fix the tests to wait that
specific amount explicitly.
2. Fix tests that sleep or wait for long amounts of time to instead
explicitly use a callback mechanism to be notified when a child
terminal job has finished. This allows the test to only take as much
time as possible instead of having to hard code an unreliable
timeout.
With these fixes, tests should 1) completely quickly on fast machines,
and 2) on slow machines they will still run to completion albeit slowly.
Note that previoulsy both were not true. The hardcoded timeouts meant
that on fast machines the tests were mostly idling wasting time, whereas
on slow machines, the timeouts often were not generous enough to allow
them to run to completion.
closes: #16615
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also, fold the difference part and the bottom part for the
identical screendump files.
closes: #16380
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Improve how to find the justify package
closes: #16420
Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
closes: #16011
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ella Moss <ella.moss@utah.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug: cannot evaluate expr in a popup
Solution: enhance termdebug plugin and allow to evaluate expressions in
a popup window, add a unit test (Peter Wolf).
fixes: #15877closes: #15933
Signed-off-by: Peter Wolf <pwolf2310@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug plugin can be further improved
Solution: add sanity-check, timeout config, change vars to bool
update docs, add more tests (Ubaldo Tiberi)
fixes: #15061closes: #15057
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: termdebug can be further improved
Solution: refactor save/restore, update docs,
add a new save/restore test (Ubaldo Tiberi)
closes: #15032
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: term_getjob() throws an exception on error
Solution: Return null_job instead, when there is no job
(Ernie Rael)
closes: #14984
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
While adding to the documentation, also mention the rolled-back key-translation
strategy in version9.txt
closes: #14069
Signed-off-by: Christian Brabandt <cb@256bit.org>
// related #12589
// that should be the last chat (I) with Bram, r.i.p
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Fix and attempt to simplify :Frame/:Up/:Down documentation.
- Accept a count instead for :Up/:Down/+/-.
- Update the "Last Change" dates.
- Fix a missing :let (caused an error if gdb fails to start).
- Wipe the prompt buffer when ending prompt mode (if it exists and wasn't wiped
by the user first). Avoids issues with stale prompt buffers (such as E95 when
starting a new prompt mode session).
- Kill the gdb job if the prompt buffer is unloaded (similar to what's done for
a terminal buffer). Fixes not being able to start a new termdebug session if
the buffer was wiped by the user, for example.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Quitting/unloading/hiding a terminal buffer does not always work
properly.
Solution: Avoid that ":q!" leaves an empty buffer behind. ":bunload!" also
kills the job and unloads the buffer. ":hide" does not unload the
buffer. (Yee Cheng Chin, closes#11323)