From b26614f10d13835c8a9b6856abcad6ad057c904e Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Fri, 24 Nov 2023 21:45:42 -0600 Subject: Add some asserts and fix the networking test --- spec/test2_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/test2_spec.lua') 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) -- cgit v1.2.3-70-g09d2