From 456ee9baefb343e98dc94678e05335a547786c2a Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 28 Jun 2019 16:13:30 -0400 Subject: Added more tests Fixed up the networking test, and added something to create the deviceinit file in the first test (so the tests just just run on a new clone now) --- spec/headless/.gitignore | 0 spec/server/.gitignore | 0 spec/test1_spec.lua | 21 +++++++++++++++++++++ spec/test3_spec.lua | 2 ++ 4 files changed, 23 insertions(+) create mode 100644 spec/headless/.gitignore create mode 100644 spec/server/.gitignore (limited to 'spec') diff --git a/spec/headless/.gitignore b/spec/headless/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/spec/server/.gitignore b/spec/server/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/spec/test1_spec.lua b/spec/test1_spec.lua index 9844204..81df8f0 100644 --- a/spec/test1_spec.lua +++ b/spec/test1_spec.lua @@ -1,5 +1,26 @@ print("Hello, world!") +--[[Create the headless client init file]] +local f = io.open("spec/headless/deviceinit.lua","w") +f:write([=[ +return { + ["Anti Alias"] = 16, + ["Bits Per Pixel"] = 16, + ["Device Type"] = "BEST", + ["Display Adapter"] = 0, + ["Double Buffer"] = true, + ["Multithreaded"] = false, + ["Driver Type"] = "NULL", + ["Fullscreen"] = false, + ["Stencil Buffer"] = true, + ["Stereo Buffer"] = false, + ["VSync"] = true, + ["Window Width"] = 640, + ["Window Height"] = 480, +} +]=]) +f:close() + function rungame() f = io.popen("bin\\client\\bin\\brokengine_client.exe spec/headless","r") d = f:read("*all") diff --git a/spec/test3_spec.lua b/spec/test3_spec.lua index e30a0ca..e19741d 100644 --- a/spec/test3_spec.lua +++ b/spec/test3_spec.lua @@ -8,6 +8,8 @@ end function 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("bin\\server\\bin\\brokengine_server.exe spec/server","r") f2 = io.popen("bin\\client\\bin\\brokengine_client.exe spec/headless","r") --print("Both ran...") -- cgit v1.2.3-70-g09d2