<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/lua/version_spec.lua, branch master</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(vim.version): fix metatable for intersections #41615</title>
<updated>2026-09-02T14:10:18+00:00</updated>
<author>
<name>Volodymyr Chernetskyi</name>
<email>volodymyr_chernetskyi@goodyear.com</email>
</author>
<published>2026-09-02T14:10:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8321941ff20e5583e2190cdfc532352ff4441914'/>
<id>8321941ff20e5583e2190cdfc532352ff4441914</id>
<content type='text'>
Problem:
`vim.version.intersect()` returns tables with `VersionRange` (method
table) as their metatable. Although the calculated bounds are correct,
the results do not expose `VersionRange` methods.

Solution:
Construct intersection tables with `range_mt`, matching
`vim.version.range()`. Add assertions covering method access and
repeated intersection.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`vim.version.intersect()` returns tables with `VersionRange` (method
table) as their metatable. Although the calculated bounds are correct,
the results do not expose `VersionRange` methods.

Solution:
Construct intersection tables with `range_mt`, matching
`vim.version.range()`. Add assertions covering method access and
repeated intersection.</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix wrong order of args to eq(), neq() #41499</title>
<updated>2026-08-26T11:18:22+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2026-08-26T11:18:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d393abad77c54ea84b1474d30e70517ff00ad334'/>
<id>d393abad77c54ea84b1474d30e70517ff00ad334</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test(harness): migrate away from magic globals</title>
<updated>2026-07-21T11:22:39+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-20T15:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6d8c8b18d551d0be0490640c00fabb816727ec10'/>
<id>6d8c8b18d551d0be0490640c00fabb816727ec10</id>
<content type='text'>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.version): add __eq to vim.VersionRange #38881</title>
<updated>2026-04-08T17:33:00+00:00</updated>
<author>
<name>ngicks</name>
<email>94618820+ngicks@users.noreply.github.com</email>
</author>
<published>2026-04-08T17:33:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a165eee64fa628045241b200d150b0f1e7737301'/>
<id>a165eee64fa628045241b200d150b0f1e7737301</id>
<content type='text'>
Problem: vim.VersionRange had no __eq metamethod, so comparing 2 distinct
but same value instances always returned false. In vim.pack.add this caused
redundant lockfile rewrites, even when the resulting lockfile content was
unchanged.

Solution: Add __eq metamethod on vim.VersionRange</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: vim.VersionRange had no __eq metamethod, so comparing 2 distinct
but same value instances always returned false. In vim.pack.add this caused
redundant lockfile rewrites, even when the resulting lockfile content was
unchanged.

Solution: Add __eq metamethod on vim.VersionRange</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.version): add `vim.version.intersect()`</title>
<updated>2025-06-30T17:59:44+00:00</updated>
<author>
<name>Evgeni Chasnovski</name>
<email>evgeni.chasnovski@gmail.com</email>
</author>
<published>2025-06-30T13:08:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=773075b2bce8f2193343c0efa73f02b1f370dc67'/>
<id>773075b2bce8f2193343c0efa73f02b1f370dc67</id>
<content type='text'>
Problem: No way to compute intersection of two version ranges, which is
useful when computing version range that fits inside several reference
ranges.

Solution: Add `vim.version.intersect()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: No way to compute intersection of two version ranges, which is
useful when computing version range that fits inside several reference
ranges.

Solution: Add `vim.version.intersect()`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(vim.version): improve construction of '&lt;=a.b.c' and '&gt;a.b.c' ranges</title>
<updated>2025-06-30T17:59:12+00:00</updated>
<author>
<name>Evgeni Chasnovski</name>
<email>evgeni.chasnovski@gmail.com</email>
</author>
<published>2025-06-30T13:08:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=649ff924d990003e9d9338d964a206e7c7a5c144'/>
<id>649ff924d990003e9d9338d964a206e7c7a5c144</id>
<content type='text'>
Problem: `vim.version.range('&lt;=a.b.c')` is not precise when it comes to
its right hand side. This is due to version ranges using exclusive right
hand side. While `vim.version.range('&gt;a.b.c')` is not precise when it
comes to its left hand side because left hand sides are inclusive.

Solution: For '&gt;=a.b.c' increase `to` from 'a.b.c' to the smallest
reasonable version that is bigger than 'a.b.c'. For '&lt;a.b.c' do the same
for `from`.
More proper solution is an explicit control over inclusivity of version
range sides, but it has more side effects and requires design decisions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `vim.version.range('&lt;=a.b.c')` is not precise when it comes to
its right hand side. This is due to version ranges using exclusive right
hand side. While `vim.version.range('&gt;a.b.c')` is not precise when it
comes to its left hand side because left hand sides are inclusive.

Solution: For '&gt;=a.b.c' increase `to` from 'a.b.c' to the smallest
reasonable version that is bigger than 'a.b.c'. For '&lt;a.b.c' do the same
for `from`.
More proper solution is an explicit control over inclusivity of version
range sides, but it has more side effects and requires design decisions.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.version): make `tostring()` return human-readable version range</title>
<updated>2025-06-30T13:08:56+00:00</updated>
<author>
<name>Evgeni Chasnovski</name>
<email>evgeni.chasnovski@gmail.com</email>
</author>
<published>2025-06-30T13:08:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=aeb8bca12ddfe741569df622ef0cbc90211a6064'/>
<id>aeb8bca12ddfe741569df622ef0cbc90211a6064</id>
<content type='text'>
Problem: `tostring()` applied to version range doesn't return
human-readable text with information about the range.

Solution: Add `__tostring()` method.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `tostring()` applied to version range doesn't return
human-readable text with information about the range.

Solution: Add `__tostring()` method.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(vim.version): vim.VersionRange:has(&lt;prerelease&gt;) (#33324)</title>
<updated>2025-04-11T10:15:18+00:00</updated>
<author>
<name>Phạm Bình An</name>
<email>111893501+brianhuster@users.noreply.github.com</email>
</author>
<published>2025-04-11T10:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=092962b07c5753e9d602f5597ad1753b19854561'/>
<id>092962b07c5753e9d602f5597ad1753b19854561</id>
<content type='text'>
Problem:
`vim.version.range('&gt;=0.10'):has('0.12.0-dev')` returns false, which is
wrong per semver.

Solution:
`vim.VersionRange:has()` shouldn't have special handling for prereleases
(Why would we need it when `__eq`, `__lt`, `__le` already handle
 prereleases?).

Closes #33316</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`vim.version.range('&gt;=0.10'):has('0.12.0-dev')` returns false, which is
wrong per semver.

Solution:
`vim.VersionRange:has()` shouldn't have special handling for prereleases
(Why would we need it when `__eq`, `__lt`, `__le` already handle
 prereleases?).

Closes #33316</pre>
</div>
</content>
</entry>
<entry>
<title>fix(version): return nil with empty string</title>
<updated>2024-07-27T13:06:31+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2024-07-27T02:19:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8bdfc2ab2b2565f06d41921d57a0c6184a097271'/>
<id>8bdfc2ab2b2565f06d41921d57a0c6184a097271</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>
</feed>
