diff options
Diffstat (limited to 'tests/testfx.lua')
-rw-r--r-- | tests/testfx.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testfx.lua b/tests/testfx.lua index a1e7eb6..9c50a9c 100644 --- a/tests/testfx.lua +++ b/tests/testfx.lua @@ -148,6 +148,8 @@ local function stub_io_output(f) end + local function stub_print(s) + end -- @@ -169,6 +171,10 @@ _OPTIONS = { } _SOLUTIONS = { } + -- capture any printed output + test.print = print + print = stub_print + test.value_openedfilename = nil test.value_openedfilemode = nil test.value_closedfile = false @@ -187,6 +193,8 @@ local function test_teardown(suite, fn) + print = test.print + if suite.teardown then return pcall(suite.teardown) else |