mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
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:
@@ -463,9 +463,9 @@ describe('lua stdlib', function()
|
||||
eq(false, fn.luaeval "vim.v['false']")
|
||||
eq(NIL, fn.luaeval 'vim.v.null')
|
||||
matches([[attempt to index .* nil value]], pcall_err(exec_lua, 'return vim.v[0].progpath'))
|
||||
eq('Key is read-only: count', pcall_err(exec_lua, [[vim.v.count = 42]]))
|
||||
eq('Dict is locked', pcall_err(exec_lua, [[vim.v.nosuchvar = 42]]))
|
||||
eq('Key is fixed: errmsg', pcall_err(exec_lua, [[vim.v.errmsg = nil]]))
|
||||
matches('Key is read%-only: count$', pcall_err(exec_lua, [[vim.v.count = 42]]))
|
||||
matches('Dict is locked$', pcall_err(exec_lua, [[vim.v.nosuchvar = 42]]))
|
||||
matches('Key is fixed: errmsg$', pcall_err(exec_lua, [[vim.v.errmsg = nil]]))
|
||||
exec_lua([[vim.v.errmsg = 'set by Lua']])
|
||||
eq('set by Lua', eval('v:errmsg'))
|
||||
exec_lua([[vim.v.errmsg = 42]])
|
||||
@@ -474,8 +474,8 @@ describe('lua stdlib', function()
|
||||
eq({ 'one', 'two' }, eval('v:oldfiles'))
|
||||
exec_lua([[vim.v.oldfiles = {}]])
|
||||
eq({}, eval('v:oldfiles'))
|
||||
eq(
|
||||
'Setting v:oldfiles to value with wrong type',
|
||||
matches(
|
||||
'Setting v:oldfiles to value with wrong type$',
|
||||
pcall_err(exec_lua, [[vim.v.oldfiles = 'a']])
|
||||
)
|
||||
eq({}, eval('v:oldfiles'))
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user