diff options
Diffstat (limited to 'spec/test2_spec.lua')
| -rw-r--r-- | spec/test2_spec.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/test2_spec.lua b/spec/test2_spec.lua index 82ca33e..575e1d1 100644 --- a/spec/test2_spec.lua +++ b/spec/test2_spec.lua @@ -77,14 +77,16 @@ describe("network library",function() end)
end
local i = os.time()
+ local game_exit = GAME.exit
function GAME.tick()
if has_ponged then
- GAME.exit()
+ game_exit()
end
if i - os.time() > 5 then
error("Failed")
end
end
+ GAME.exit = function(...) end -- only exit when we pong, not before.
]])
common.writegame([[
local socket = net.newsocket(net.PAIR)
|
