build(ci): bump zig to 0.15.1 and add more platforms

- Bump zig version to 0.15.1 and workaround zig fetch hang (ziglang/zig#24916)
- add mac os zig build (currently without luajit, linker failure)
- Add windows zig build, currently with very limited testing
This commit is contained in:
bfredl
2025-08-07 11:36:21 +02:00
parent 2debe2f30a
commit 0458a1e694
8 changed files with 95 additions and 33 deletions

View File

@@ -4,6 +4,7 @@ local n = require('test.functional.testnvim')()
local clear = n.clear
local exec_lua = n.exec_lua
local eq = t.eq
local matches = t.matches
local pcall_err = t.pcall_err
describe('xdiff bindings', function()
@@ -169,25 +170,25 @@ describe('xdiff bindings', function()
end)
it('can handle bad args', function()
eq([[Expected at least 2 arguments]], pcall_err(exec_lua, [[vim.text.diff('a')]]))
matches([[Expected at least 2 arguments$]], pcall_err(exec_lua, [[vim.text.diff('a')]]))
t.matches(
matches(
[[bad argument %#1 to '_?diff' %(expected string%)]],
pcall_err(exec_lua, [[vim.text.diff(1, 2)]])
)
t.matches(
matches(
[[bad argument %#3 to '_?diff' %(expected table%)]],
pcall_err(exec_lua, [[vim.text.diff('a', 'b', true)]])
)
eq(
[[invalid key: bad_key]],
matches(
[[invalid key: bad_key$]],
pcall_err(exec_lua, [[vim.text.diff('a', 'b', { bad_key = true })]])
)
eq(
[[on_hunk is not a function]],
matches(
[[on_hunk is not a function$]],
pcall_err(exec_lua, [[vim.text.diff('a', 'b', { on_hunk = true })]])
)
end)