aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--busted.spec37
-rw-r--r--spec/test1_spec.lua21
-rw-r--r--spec/test3_spec.lua2
3 files changed, 23 insertions, 37 deletions
diff --git a/busted.spec b/busted.spec
deleted file mode 100644
index 9399ee4..0000000
--- a/busted.spec
+++ /dev/null
@@ -1,37 +0,0 @@
-
-local function create_test_file(str)
-
-end
-
-describe("brokengine",function()
- describe("gui library",function()
- for k,v in pairs({
- "button",
- "checkbox",
- "colorselector",
- "combobox",
- "contextmenu",
- "editbox",
- "fileopen",
- "image",
- "imagelist",
- "inoutfader",
- "listbox",
- "meshviewer",
- "scrollbar",
- "spinbox",
- "statictext",
- "tab",
- "tabcontrol",
- "table",
- "toolbar",
- "treeview",
- "treeviewnode",
- "window"
- }) do
- it(string.format("should be able to create a %s",v),function()
-
- end)
- end
- end)
-end)
diff --git a/spec/test1_spec.lua b/spec/test1_spec.lua
index 9248b11..147abbd 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()
+
local game_bin = nil
if package.config:sub(1,1) == "/" then -- linux or osx
game_bin = "bin/client/bin/brokengine_client"
diff --git a/spec/test3_spec.lua b/spec/test3_spec.lua
index 0df875d..8861b0c 100644
--- a/spec/test3_spec.lua
+++ b/spec/test3_spec.lua
@@ -17,6 +17,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(server_bin .. " spec/server","r")
f2 = io.popen(game_bin .. " spec/headless","r")
--print("Both ran...")