aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-05-01 18:45:57 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-05-01 18:45:57 -0400
commitf5c9913478b3a6c52327b739be7e48d55fb7d09a (patch)
treedfadee47ee035014ab384719be3777123cb6979e /test
parent87b186fa7c860308a2bcd9eeaf9c361792d0764c (diff)
Print test output to stdout and add option to quit after running tests.
Diffstat (limited to 'test')
-rw-r--r--test/test.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test.lua b/test/test.lua
index 09caf59e..60679eef 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -4835,7 +4835,11 @@ end
assert(not WIN32 and not OSX, 'Test suite currently only runs on Linux')
local TEST_OUTPUT_BUFFER = '[Test Output]'
-function print(...) ui._print(TEST_OUTPUT_BUFFER, ...) end
+local print_ = print
+function print(...)
+ ui._print(TEST_OUTPUT_BUFFER, ...)
+ print_(...)
+end
-- Clean up after a previously failed test.
local function cleanup()
while #_BUFFERS > 1 do
@@ -4862,7 +4866,7 @@ local function include_test(name)
if patt:find('^%-') then
if name:find(patt:sub(2)) then return false end
excludes = true
- else
+ elseif patt ~= 'quit' then
if name:find(patt) then include = true end
includes = true
end
@@ -4928,3 +4932,5 @@ else
buffer:append_text('No LuaCov coverage to report.')
end
buffer:set_save_point()
+
+if arg[#arg] == 'quit' then quit() end