feat(vim.version): more coercion with strict=false

Problem:
"tmux 3.2a" (output from "tmux -V") is not parsed easily.

Solution:
With `strict=false`, discard everything before the first digit.

- rename Semver => Version
- rename vim.version.version() => vim.version._version()
- rename matches() => has()
- remove `opts` from cmp()
This commit is contained in:
Justin M. Keyes
2023-03-17 01:12:33 +01:00
parent a715e6f87e
commit a40eb7cc99
6 changed files with 374 additions and 210 deletions

View File

@@ -202,7 +202,7 @@ describe(':terminal buffer', function()
-- Save the buffer number of the terminal for later testing.
local tbuf = eval('bufnr("%")')
local exitcmd = helpers.is_os('win')
local exitcmd = is_os('win')
and "['cmd', '/c', 'exit']"
or "['sh', '-c', 'exit']"
source([[