restore globals after running tests
[?]
Jan 23, 2023, 7:45 AM
FFFJ54GJ3A2HNKZEHO7RHUZ2YWT67EK4B3Y2YJVYCEUANGY6BQQACDependencies
- [2]
K7YGVRXHgeneralize the protocol to return errors, etc. - [3]
3BRGOF7Nreturn failing tests with every code change - [*]
LRDM35CEapp running again
Change contents
- edit in live.lua at line 281
-- run all testslocal globals = live.shallow_copy_all_globals() - edit in live.lua at line 285
live.restore_all_globals(globals) - edit in live.lua at line 291[2.39][5.8032]
endendfunction live.shallow_copy_all_globals()local result = {}for k,v in pairs(_G) doresult[k] = vendreturn resultendfunction live.restore_all_globals(x)-- delete extra bindingsfor k,v in pairs(_G) doif x[k] == nil then_G[k] = nilendend-- restore previous bindingsfor k,v in pairs(x) do_G[k] = v