Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstarkos <none@none>2009-08-11 04:49:11 +0400
committerstarkos <none@none>2009-08-11 04:49:11 +0400
commitca1a3d7a946c90ef624256676e785b55b9c372c8 (patch)
treec9d6acfa52eb9d34cc80e4f490786e5bb534fb60 /tests/base
parent135ddda5f588af3ca53dcf567c8db59a5ac75c5a (diff)
Add onsolution() and onproject() callbacks to actions
Diffstat (limited to 'tests/base')
-rw-r--r--tests/base/test_action.lua26
1 files changed, 21 insertions, 5 deletions
diff --git a/tests/base/test_action.lua b/tests/base/test_action.lua
index 882e242..b912471 100644
--- a/tests/base/test_action.lua
+++ b/tests/base/test_action.lua
@@ -18,6 +18,10 @@
function T.action.setup()
premake.action.list["fake"] = fake
+ solution "MySolution"
+ configurations "Debug"
+ project "MyProject"
+ premake.buildconfigs()
end
function T.action.teardown()
@@ -27,18 +31,30 @@
--
--- Tests
+-- Tests for call()
--
- function T.action.ExecuteIsCalledIfPresent()
+ function T.action.CallCallsExecuteIfPresent()
local called = false
fake.execute = function () called = true end
premake.action.call("fake")
test.istrue(called)
end
+
+ function T.action.CallCallsOnSolutionIfPresent()
+ local called = false
+ fake.onsolution = function () called = true end
+ premake.action.call("fake")
+ test.istrue(called)
+ end
+
+ function T.action.CallCallsOnProjectIfPresent()
+ local called = false
+ fake.onproject = function () called = true end
+ premake.action.call("fake")
+ test.istrue(called)
+ end
- function T.action.ExecuteIsSkippedIfNotPresent()
+ function T.action.CallSkipsCallbacksIfNotPresent()
test.success(premake.action.call, "fake")
end
-
-