diff options
Diffstat (limited to 'spec/common.lua')
| -rw-r--r-- | spec/common.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/common.lua b/spec/common.lua index 4df1a7c..f1eee04 100644 --- a/spec/common.lua +++ b/spec/common.lua @@ -10,9 +10,9 @@ else -- windows end
function common.rungame()
- f = io.popen(game_bin .. " spec/headless","r")
- d = f:read("*all")
- f:close()
+ f = assert(io.popen(game_bin .. " spec/headless","r"))
+ d = assert(f:read("*all"))
+ assert(f:close())
--print(d)
return d
end
@@ -21,8 +21,8 @@ function common.runboth() --print("Running both")
--Do we have a race condition here? (Can client start and send it's message
--before the server is ready to accept?
- f1 = io.popen(server_bin .. " spec/server","r")
- f2 = io.popen(game_bin .. " spec/headless","r")
+ f1 = assert(io.popen(server_bin .. " spec/server","r"))
+ f2 = assert(io.popen(game_bin .. " spec/headless","r"))
--print("Both ran...")
d1 = f1:read("*all")
d2 = f2:read("*all")
|
