diff options
author | starkos <none@none> | 2009-09-16 01:08:40 +0400 |
---|---|---|
committer | starkos <none@none> | 2009-09-16 01:08:40 +0400 |
commit | 7c51b98b0d215357d0ff936d8c6dabea0e8c156a (patch) | |
tree | a711e786c52681e83b40dac2efdd7795dd22b661 /tests/testfx.lua | |
parent | 815727cb242928f2386627736600db6b66ec3084 (diff) |
Cleaned up PBXBuildFile and PBXFileReference sections
Diffstat (limited to 'tests/testfx.lua')
-rw-r--r-- | tests/testfx.lua | 19 |
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 |