mirror of
https://github.com/neovim/neovim.git
synced 2025-12-06 22:52:42 +00:00
fix: version-range < and <= #23539
vim.version.range() couldn't parse them correctly.
For example, vim.version.range('<0.9.0'):has('0.9.0') returned `true`.
fix: range:has() accepts vim.version()
So that it's possible to compare a range with:
vim.version.range(spec):has(vim.version())
This commit is contained in:
@@ -40,6 +40,8 @@ describe('version', function()
|
||||
['=1.2.3'] = { from = { 1, 2, 3 }, to = { 1, 2, 4 } },
|
||||
['>1.2.3'] = { from = { 1, 2, 4 } },
|
||||
['>=1.2.3'] = { from = { 1, 2, 3 } },
|
||||
['<1.2.3'] = { from = { 0, 0, 0 }, to = { 1, 2, 3 } },
|
||||
['<=1.2.3'] = { from = { 0, 0, 0 }, to = { 1, 2, 4 } },
|
||||
['~1.2.3'] = { from = { 1, 2, 3 }, to = { 1, 3, 0 } },
|
||||
['^1.2.3'] = { from = { 1, 2, 3 }, to = { 2, 0, 0 } },
|
||||
['^0.2.3'] = { from = { 0, 2, 3 }, to = { 0, 3, 0 } },
|
||||
|
||||
Reference in New Issue
Block a user