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-09-16 01:08:40 +0400
committerstarkos <none@none>2009-09-16 01:08:40 +0400
commit7c51b98b0d215357d0ff936d8c6dabea0e8c156a (patch)
treea711e786c52681e83b40dac2efdd7795dd22b661 /tests/testfx.lua
parent815727cb242928f2386627736600db6b66ec3084 (diff)
Cleaned up PBXBuildFile and PBXFileReference sections
Diffstat (limited to 'tests/testfx.lua')
-rw-r--r--tests/testfx.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/testfx.lua b/tests/testfx.lua
index 129527a..c2414fc 100644
--- a/tests/testfx.lua
+++ b/tests/testfx.lua
@@ -10,7 +10,7 @@
--
test = { }
-
+
--
-- Assertion functions
@@ -178,10 +178,7 @@
_OPTIONS = { }
_SOLUTIONS = { }
- -- capture any printed output
- test.print = print
- print = stub_print
-
+ -- reset captured I/O values
test.value_openedfilename = nil
test.value_openedfilemode = nil
test.value_closedfile = false
@@ -200,8 +197,6 @@
local function test_teardown(suite, fn)
- print = test.print
-
if suite.teardown then
return pcall(suite.teardown)
else
@@ -211,8 +206,11 @@
function test.runall()
- io.open = stub_io_open
- io.output = stub_io_output
+ test.print = print
+
+ print = stub_print
+ io.open = stub_io_open
+ io.output = stub_io_output
local numpassed = 0
local numfailed = 0
@@ -231,7 +229,7 @@
err = err or tok
if (not ok) then
- print(string.format("%s.%s: %s", suitename, testname, err))
+ test.print(string.format("%s.%s: %s", suitename, testname, err))
numfailed = numfailed + 1
else
numpassed = numpassed + 1
@@ -240,6 +238,7 @@
end
end
+ print = test.print
return numpassed, numfailed
end