mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Make context functions return result
This commit is contained in:
parent
1d565262e1
commit
6ead93088a
3 changed files with 15 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue