<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kakoune.git/test/run, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/'/>
<entry>
<title>Print full test name in test framework</title>
<updated>2025-07-01T00:38:19+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2025-07-01T00:38:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=c24215b2b2935f86c2ac1fb26bd6294030ea00b1'/>
<id>c24215b2b2935f86c2ac1fb26bd6294030ea00b1</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix flaky blame-in-diff test and "edit -fifo" in BufCloseFifo</title>
<updated>2025-06-26T01:34:17+00:00</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2024-12-13T07:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=cff5f12a852a34a548aabfb6166c86fa35466a83'/>
<id>cff5f12a852a34a548aabfb6166c86fa35466a83</id>
<content type='text'>
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 &lt;nsonack@herrhotzenplotz.de&gt;

[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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;nsonack@herrhotzenplotz.de&gt;

[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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test runner for tests using assert_eq</title>
<updated>2025-06-24T06:22:37+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2025-06-24T06:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=f73a2957f233ec07f1b3ab81957c1c3e98d1f5da'/>
<id>f73a2957f233ec07f1b3ab81957c1c3e98d1f5da</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use word-diff when possible when comparing json ui output in tests</title>
<updated>2025-06-23T00:25:29+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2025-06-22T01:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=d51d50efb767f4af4c960398e987e39026788fdc'/>
<id>d51d50efb767f4af4c960398e987e39026788fdc</id>
<content type='text'>
If git is present we can rely on git-diff word support to get a much
easier to understand diff.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If git is present we can rely on git-diff word support to get a much
easier to understand diff.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove noisy output from tests</title>
<updated>2024-11-11T10:30:01+00:00</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2024-11-10T18:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=8c74660ad3ede76107b4a2f450c27a9202b79937'/>
<id>8c74660ad3ede76107b4a2f450c27a9202b79937</id>
<content type='text'>
"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 &gt;/dev/null to the other invocations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"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 &gt;/dev/null to the other invocations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify ui_out argument parsing</title>
<updated>2024-11-11T10:29:56+00:00</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2024-11-10T18:38:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=66aa444c6f94bc539d23d47a8e58b4909accbd64'/>
<id>66aa444c6f94bc539d23d47a8e58b4909accbd64</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change ui_out -until-grep to check for equality the next argument</title>
<updated>2024-11-03T20:15:34+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2024-11-01T23:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=60fcc3443ef199f329a4e5c4fcd94ad017813a9b'/>
<id>60fcc3443ef199f329a4e5c4fcd94ad017813a9b</id>
<content type='text'>
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 &lt;pattern&gt; [&lt;expected&gt;]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;pattern&gt; [&lt;expected&gt;]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix another case where git tests were hanging</title>
<updated>2024-05-12T04:18:17+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2024-05-12T04:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=0e92b3fdefddbf81a008b3678faf4bf550be215c'/>
<id>0e92b3fdefddbf81a008b3678faf4bf550be215c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tests that were failing on alpine</title>
<updated>2024-05-10T02:07:45+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2024-05-10T02:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=8c2775f665fd4aae603b423362cf0d4d917fc0df'/>
<id>8c2775f665fd4aae603b423362cf0d4d917fc0df</id>
<content type='text'>
Ensure perl exists for git blame tests, replace timing sensitive
`ui_out -ignore ...` with `ui_out -until '...'`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure perl exists for git blame tests, replace timing sensitive
`ui_out -ignore ...` with `ui_out -until '...'`
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused -within-next ui_out switch</title>
<updated>2024-02-18T04:46:24+00:00</updated>
<author>
<name>Maxime Coste</name>
<email>mawww@kakoune.org</email>
</author>
<published>2024-02-18T04:46:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vinkies.net/kakoune.git/commit/?id=150ea50391a9457ee75375204c6d17209fc4eb22'/>
<id>150ea50391a9457ee75375204c6d17209fc4eb22</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
