| Age | Commit message (Collapse) | Author |
|
computing the indentation is surprisingly costly (close to 8% of the
whole test framework runtime), and having the full path to easily copy
paste is handy instead of recreating it from the printed tree.
|
|
This test uses ui_out and ui_in to coordinate events.
This is brittle[1] because ui_out behavior depends on timing.
Since this test doesn't really care about intermediate UI state,
express the sequence using BufCloseFifo instead.
This hits another issue: inside git blame-jump's BufCloseFifo, we
run git blame, which runs another "edit -fifo .. *git*". A special
aspect of fifo buffers is that any existing *git* buffer will be
reused instead of being recreated[2]. After BufCloseFifo, the fifo
watcher destructor will reset the fifo flag, even if BufCloseFifo
has recreated the fifo buffer. This breaks invariants and causes
the next fifo watcher destructor do fail its assertion.
Let's not reset fifo flags in this case. This should be safe because
it's the very last thing the fifo watcher does, so it's okay if
another one is active now.
Alternatively we could reject this kind of recursion, or implement
it in a different way (using ScopedSetBool for the flags).
Reported-by: Nico Sonack <nsonack@herrhotzenplotz.de>
[1]: https://lists.sr.ht/~mawww/kakoune/%3C20241210100417.1150697-1-aclopte@gmail.com%3E
[2]: This removes the need to use delete-buffer which also ensures that
the buffer remains visible in any client it's already shown.
|
|
assert_eq got renamed to check_json_eq but the fact this was used by
tests in their script file was missed, renamed it back to assert_eq
as this function is not necessarily used for json.
|
|
If git is present we can rely on git-diff word support to get a much
easier to understand diff.
|
|
"ui_out -until-grep" invocations used to redirect the output from
grep, usually to /dev/null. Looks like the intention of 60fcc3443
(Change ui_out -until-grep to check for equality the next argument,
2024-11-02) was that grep no longer needs to print output, since we
can assert instead which is mildly better.
Unfortunately there are two places where -until-grep might not be
powerful enough, which is why we capture the output and check it
in the test script. For one of them we can use -until-grep with a
small change. Not yet sure about the other one. Let's try to use
eval instead, so we can silence the output.
I realize -until-eval is not great (the nested quoting is ugly)
but I guess it's better than the status quo.
Alternatively, we could print output only if the [expected] argument
is not given, and add >/dev/null to the other invocations.
|
|
Tests print a confusing error
./run: line 214: shift: shift count out of range
This is because ui_out -until-grep now shifts twice which conflicts
with the weird shift at the end of ui_out.
It also has a loop, making it possible to do something like "ui_out
foo bar baz" to expect three different messages. We don't use this
feature anywhere, and it seems just super surprising, given that
ui_out now consumes between 1 and 3 arguments each time. Let's get
rid of the loop, and always run shift right next to where we actually
use the argument. This should make things less brittle.
|
|
Instead of outputing the matching output, either ignore the output
(if not extra argument is given) or match it.
Usage is: ui_out -until-grep <pattern> [<expected>]
|
|
|
|
Ensure perl exists for git blame tests, replace timing sensitive
`ui_out -ignore ...` with `ui_out -until '...'`
|
|
|
|
This test fails occasionally[1] because the order of events and the
number of events varies across runs.
We should always call draw_status exactly 3 times:
[*git*][fifo]
[*git*]
Commit subject etc. [*git*]
Let's check it this way.
This seems to work; this time I took the time to run it a couple
hundred times and in Cirrus CI.
[1] https://builds.sr.ht/~mawww/job/1151239
|
|
Commit 53d9b9b67 (Escaping tweak in git.kak, 2024-02-06) broke
blame-jump when the commit subject contains a single quote.
(Also on unbalanced "{" which is a rare edge case but we already have
it in our Git history.)
git.kak assumes that filenames don't contain ' or unbalanced {,
but we can't really make that assumption about people's names or
commit subjects.
Unfortunately the escaping here is very messy. We need to pass
arbitrary text to callbacks; maybe we should have closures that can
capture private temporary registers.
|
|
Add a -end-of-line switch to echo command to make it possible
to use `echo -end-of-line -to-file <file>` to collect env-vars
|
|
Fix by copying the `enabled` check file, if it exists to where the tests are being run
|
|
Add a -force (equivalent to w!) switch that enables overwriting.
|
|
Setting it to `gdbserver :12345` makes it easy to debug a test
case with the correct setup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removing the underscore seems to make the option name more
in line with the others (even though some do use a separator,
e.g. `disabled_hooks`).
|
|
|
|
|
|
With this fix, tests can now use /dev/null as stdin.
Fixes #2165
|
|
With this "ui-in", tests can execute json-rpc commands from the UI
at startup to set a specific UI state.
|
|
|
|
|
|
source the rc file *after* selecting the target text to ensure
eventual hooks will not interfere.
|
|
|
|
|
|
<a-;>. is not accepted anymore. Note that <a-;> are not repeatable
currently anyway (That could be fixed, athough not trivial).
Fixes #1469
|
|
|
|
|
|
|
|
Avoid eventual interpretation of escapes in the line.
|
|
|
|
On travis-ci, it seems the combination of a set TMPDIR and long sessions names
makes the test framework hit the path lenght limit.
|
|
Fixes #700
|
|
|
|
|
|
|
|
|
|
|
|
|