mirror of
https://github.com/neovim/neovim.git
synced 2026-06-24 08:48:16 +00:00
test: fix confusing behavior of eq() with context (#40375)
(cherry picked from commit ceaf2baa60)
This commit is contained in:
committed by
github-actions[bot]
parent
3dd3a6ceab
commit
6707ad275d
@@ -21,11 +21,10 @@ end
|
||||
--- @param condition boolean
|
||||
--- @param value any
|
||||
--- @param context any
|
||||
--- @param fallback string
|
||||
local function assert_value(condition, value, context, fallback)
|
||||
--- @param message string
|
||||
local function assert_value(condition, value, context, message)
|
||||
if not condition then
|
||||
local message = context ~= nil and tostring(context) or fallback
|
||||
error(message, 0)
|
||||
error((context ~= nil and tostring(context) .. ': ' or '') .. message, 0)
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user