Skip to content

Commit

Permalink
Improve reporting of failing tests in --quiet mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
corsix committed Apr 9, 2016
1 parent f40304d commit e002a08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,17 @@ local function execute_plan(plan, opts)
local plan_i = plan[i]
local test = plan_i[3]
if test then
local file, name = plan_i[1], plan_i[2]
if not opts.quiet then
local file, name = plan_i[1], plan_i[2]
io_write(progress_format:format(i), file)
io_write(file == "" and "" or " --- ", name, "\n")
end
local ok, err = xpcall(test, debug_traceback)
if not ok then
if opts.quiet then
io_write(progress_format:format(i), file)
io_write(file == "" and "" or " --- ", name, "\n")
end
fail_numbers[#fail_numbers + 1] = i
io_write(err, "\n")
end
Expand Down

0 comments on commit e002a08

Please sign in to comment.