aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2023-11-24 21:55:24 -0600
committerAlexander M Pickering <alex@cogarr.net>2023-11-24 21:55:24 -0600
commitb5efc9f14878ee383c765c853fbc20c2351b5477 (patch)
tree13f389202e3eb4639d39dc23675b5d5c91d28fa0 /spec
parent004e369c3cf18f6106856857a6358514910cf48c (diff)
downloadbrokengine-b5efc9f14878ee383c765c853fbc20c2351b5477.tar.gz
brokengine-b5efc9f14878ee383c765c853fbc20c2351b5477.tar.bz2
brokengine-b5efc9f14878ee383c765c853fbc20c2351b5477.zip
Fix gui tests
Fix the gui test generator
Diffstat (limited to 'spec')
-rw-r--r--spec/test4_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/test4_spec.lua b/spec/test4_spec.lua
index 93c4e70..111b5b6 100644
--- a/spec/test4_spec.lua
+++ b/spec/test4_spec.lua
@@ -105,7 +105,7 @@ gui_api = {
},
}
---[[For some reason these can't be local, _ENV dosn't find them.]]
+--[[For some reason these can't be local.]]
local function mr()
return string.format("%d",math.floor(math.random()*100))
end
@@ -132,13 +132,13 @@ describe("Brok[en]gine",function()
local num_optional_args = 0
local num_required_args = 0
for i,j in pairs(v.params) do
- assert(_ENV["generate_" .. j.type], "Could not find a generator for type: " .. j.type)
+ assert(_G["generate_" .. j.type], "Could not find a generator for type: " .. j.type)
if j.required then
num_required_args = num_required_args + 1
else
num_optional_args = num_optional_args + 1
end
- paramstring[#paramstring + 1] = _ENV["generate_" .. j.type]()
+ paramstring[#paramstring + 1] = _G["generate_" .. j.type]()
end
for i = num_required_args, num_required_args + num_optional_args do
it(string.format(" with %d params", i),function()