<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/buffer_spec.lua, branch rahm</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(tests): needing two calls to setup a screen is cringe</title>
<updated>2024-11-14T11:40:57+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-11-11T21:15:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e61228a214ebda9845db9462dad0a8c362d3963f'/>
<id>e61228a214ebda9845db9462dad0a8c362d3963f</id>
<content type='text'>
Before calling "attach" a screen object is just a dummy container for
(row, col) values whose purpose is to be sent as part of the "attach"
function call anyway.

Just create the screen in an attached state directly. Keep the complete
(row, col, options) config together. It is still completely valid to
later detach and re-attach as needed, including to another session.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before calling "attach" a screen object is just a dummy container for
(row, col) values whose purpose is to be sent as part of the "attach"
function call anyway.

Just create the screen in an attached state directly. Keep the complete
(row, col, options) config together. It is still completely valid to
later detach and re-attach as needed, including to another session.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): nvim_buf_get_text() crashes with large negative column #28740</title>
<updated>2024-09-03T13:01:42+00:00</updated>
<author>
<name>vanaigr</name>
<email>vanaigranov@gmail.com</email>
</author>
<published>2024-09-03T13:01:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d1d7d5468091fc71fb85c090da87253efdfcdf08'/>
<id>d1d7d5468091fc71fb85c090da87253efdfcdf08</id>
<content type='text'>
Problem:
crash when calling nvim_buf_get_text() with a large negative start_col:

    call nvim_buf_get_text(0, 0, -123456789, 0, 0, {})

Solution:
clamp start_col after subtracting it from the line length.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
crash when calling nvim_buf_get_text() with a large negative start_col:

    call nvim_buf_get_text(0, 0, -123456789, 0, 0, {})

Solution:
clamp start_col after subtracting it from the line length.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(tests): use more global highlight definitions</title>
<updated>2024-05-26T07:22:20+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-05-25T17:18:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=fb43741f80175ba5e26addb785162dd83d33c859'/>
<id>fb43741f80175ba5e26addb785162dd83d33c859</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: improve test conventions</title>
<updated>2024-04-23T16:17:04+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-04-20T15:44:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=052498ed42780a76daea589d063cd8947a894673'/>
<id>052498ed42780a76daea589d063cd8947a894673</id>
<content type='text'>
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): ignore 'autochdir' when renaming other buf (#28376)</title>
<updated>2024-04-16T12:57:01+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-04-16T12:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5cfdaaaeac0f53a621696d8eb6b5a3ba90438c98'/>
<id>5cfdaaaeac0f53a621696d8eb6b5a3ba90438c98</id>
<content type='text'>
Problem:  Renaming non-current buffer changes working directory when
          'autochdir' is set.
Solution: Temporarily disable 'autochdir'.  Add more tests for the
          win_set_buf change.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Renaming non-current buffer changes working directory when
          'autochdir' is set.
Solution: Temporarily disable 'autochdir'.  Add more tests for the
          win_set_buf change.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(test): inject after_each differently</title>
<updated>2024-04-10T14:53:50+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-04-09T11:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=81fc27124b9e1b375e0ce9605ae69c3c2a2d9222'/>
<id>81fc27124b9e1b375e0ce9605ae69c3c2a2d9222</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: improve test conventions</title>
<updated>2024-04-08T20:51:00+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-04-08T09:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7035125b2b26aa68fcfb7cda39377ac79926a0f9'/>
<id>7035125b2b26aa68fcfb7cda39377ac79926a0f9</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/27004.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/27004.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: reduce `exec_lua` calls</title>
<updated>2024-04-04T11:10:11+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-04-02T13:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e016f5bee6293d126fde9e8d75a3f02f882e2c81'/>
<id>e016f5bee6293d126fde9e8d75a3f02f882e2c81</id>
<content type='text'>
`exec_lua` makes code slighly harder to read, so it's beneficial to
remove it in cases where it's possible or convenient.

Not all `exec_lua` calls should be removed even if the test passes as it
changes the semantics of the test even if it happens to pass.

From https://github.com/neovim/neovim/pull/28155#discussion_r1548185779:

"Note for tests like this, which fundamentally are about conversion, you
end up changing what conversion you are testing. Even if the result
happens to be same (as they often are, as we like the rules to be
consistent if possible), you are now testing the RPC conversion rules
instead of the vim script to in-process lua conversion rules."

From https://github.com/neovim/neovim/pull/28155#discussion_r1548190152:

"A test like this specifies that the cursor is valid immediately and not
after a separate cycle of normal (or an other input-processing) mode."
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`exec_lua` makes code slighly harder to read, so it's beneficial to
remove it in cases where it's possible or convenient.

Not all `exec_lua` calls should be removed even if the test passes as it
changes the semantics of the test even if it happens to pass.

From https://github.com/neovim/neovim/pull/28155#discussion_r1548185779:

"Note for tests like this, which fundamentally are about conversion, you
end up changing what conversion you are testing. Even if the result
happens to be same (as they often are, as we like the rules to be
consistent if possible), you are now testing the RPC conversion rules
instead of the vim script to in-process lua conversion rules."

From https://github.com/neovim/neovim/pull/28155#discussion_r1548190152:

"A test like this specifies that the cursor is valid immediately and not
after a separate cycle of normal (or an other input-processing) mode."
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(tests): all screen tests should use highlights</title>
<updated>2024-03-23T12:44:35+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-03-22T10:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0c59771e314d6faaad69676985cd2a11c157ee37'/>
<id>0c59771e314d6faaad69676985cd2a11c157ee37</id>
<content type='text'>
This is the first installment of a multi-PR series significantly
refactoring how highlights are being specified.

The end goal is to have a base set of 20 ish most common highlights,
and then specific files only need to add more groups to that as needed.

As a complicating factor, we also want to migrate to the new default
color scheme eventually. But by sharing a base set, that future PR
will hopefully be a lot smaller since a lot of tests will be migrated
just simply by updating the base set in place.

As a first step, fix the anti-pattern than Screen defaults to ignoring
highlights. Highlights are integral part of the screen state, not
something "extra" which we only test "sometimes". For now, we still
allow opt-out via the intentionally ugly

  screen._default_attr_ids = nil

The end goal is to get rid of all of these eventually (which will be
easier as part of the color scheme migration)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the first installment of a multi-PR series significantly
refactoring how highlights are being specified.

The end goal is to have a base set of 20 ish most common highlights,
and then specific files only need to add more groups to that as needed.

As a complicating factor, we also want to migrate to the new default
color scheme eventually. But by sharing a base set, that future PR
will hopefully be a lot smaller since a lot of tests will be migrated
just simply by updating the base set in place.

As a first step, fix the anti-pattern than Screen defaults to ignoring
highlights. Highlights are integral part of the screen state, not
something "extra" which we only test "sometimes". For now, we still
allow opt-out via the intentionally ugly

  screen._default_attr_ids = nil

The end goal is to get rid of all of these eventually (which will be
easier as part of the color scheme migration)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): fix set_lines viewport adjustment, but this time good</title>
<updated>2024-03-14T09:56:24+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-03-14T09:55:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=fc2a56fe61a95b4124045039b39e20419920d2e2'/>
<id>fc2a56fe61a95b4124045039b39e20419920d2e2</id>
<content type='text'>
fixes #27720
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #27720
</pre>
</div>
</content>
</entry>
</feed>
