Make context functions return result

This commit is contained in:
aaron 2024-10-09 02:12:25 +01:00
parent 1d565262e1
commit 6ead93088a
3 changed files with 15 additions and 3 deletions

View file

@ -2192,10 +2192,12 @@ TEST("context()", function()
CHECK(ctx() == 1)
root(function()
ctx(2, function()
local v = ctx(2, function()
CHECK(ctx() == 2)
return ctx()
end)
CHECK(v == 2)
CHECK(ctx() == 1)
end)
end