aboutsummaryrefslogtreecommitdiff
path: root/test/busted
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-05-30 02:40:17 -0700
committerJustin M. Keyes <justinkz@gmail.com>2022-06-15 19:23:10 -0700
commitb6467dfc23dab476e256490b8014bbb488684e6b (patch)
tree9cc3e081012172c1c57d70312eae7a43c600b8ee /test/busted
parent8f065205946844d87f00d6c55517521e3809f821 (diff)
downloadrneovim-b6467dfc23dab476e256490b8014bbb488684e6b.tar.gz
rneovim-b6467dfc23dab476e256490b8014bbb488684e6b.tar.bz2
rneovim-b6467dfc23dab476e256490b8014bbb488684e6b.zip
test(report): formatting, drop dumplog()
Don't need to dumplog() on each failed test because we now have test-ids that associate log messages with tests.
Diffstat (limited to 'test/busted')
-rw-r--r--test/busted/outputHandlers/nvim.lua30
1 files changed, 17 insertions, 13 deletions
diff --git a/test/busted/outputHandlers/nvim.lua b/test/busted/outputHandlers/nvim.lua
index 22b2f278ef..2ce32c3b7a 100644
--- a/test/busted/outputHandlers/nvim.lua
+++ b/test/busted/outputHandlers/nvim.lua
@@ -1,4 +1,5 @@
local pretty = require 'pl.pretty'
+local global_helpers = require('test.helpers')
-- Colors are disabled by default. #15610
local colors = setmetatable({}, {__index = function() return function(s) return s == nil and '' or tostring(s) end end})
@@ -25,35 +26,35 @@ return function(options)
local repeatSuiteString = '\nRepeating all tests (run %d of %d) . . .\n\n'
local randomizeString = c.note('Note: Randomizing test order with a seed of %d.\n')
- local globalSetup = c.sect('[----------]') .. ' Global test environment setup.\n'
- local fileStartString = c.sect('[----------]') .. ' Running tests from ' .. c.file('%s') .. '\n'
- local runString = c.sect('[ RUN ]') .. ' ' .. c.test('%s') .. ': '
+ local globalSetup = c.sect('--------') .. ' Global test environment setup.\n'
+ local fileStartString = c.sect('--------') .. ' Running tests from ' .. c.file('%s') .. '\n'
+ local runString = c.sect('RUN ') .. ' ' .. c.test('%s') .. ': '
local successString = c.succ('OK') .. '\n'
local skippedString = c.skip('SKIP') .. '\n'
local failureString = c.fail('FAIL') .. '\n'
local errorString = c.errr('ERR') .. '\n'
- local fileEndString = c.sect('[----------]') .. ' '.. c.nmbr('%d') .. ' %s from ' .. c.file('%s') .. ' ' .. c.time('(%.2f ms total)') .. '\n\n'
- local globalTeardown = c.sect('[----------]') .. ' Global test environment teardown.\n'
- local suiteEndString = c.sect('[==========]') .. ' ' .. c.nmbr('%d') .. ' %s from ' .. c.nmbr('%d') .. ' test %s ran. ' .. c.time('(%.2f ms total)') .. '\n'
- local successStatus = c.succ('[ PASSED ]') .. ' ' .. c.nmbr('%d') .. ' %s.\n'
+ local fileEndString = c.sect('--------') .. ' '.. c.nmbr('%d') .. ' %s from ' .. c.file('%s') .. ' ' .. c.time('(%.2f ms total)') .. '\n\n'
+ local globalTeardown = c.sect('--------') .. ' Global test environment teardown.\n'
+ local suiteEndString = c.sect('========') .. ' ' .. c.nmbr('%d') .. ' %s from ' .. c.nmbr('%d') .. ' test %s ran. ' .. c.time('(%.2f ms total)') .. '\n'
+ local successStatus = c.succ('PASSED ') .. ' ' .. c.nmbr('%d') .. ' %s.\n'
local timeString = c.time('%.2f ms')
local summaryStrings = {
skipped = {
- header = c.skip('[ SKIPPED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
- test = c.skip('[ SKIPPED ]') .. ' %s\n',
+ header = c.skip('SKIPPED ') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
+ test = c.skip('SKIPPED ') .. ' %s\n',
footer = ' ' .. c.nmbr('%d') .. ' SKIPPED %s\n',
},
failure = {
- header = c.fail('[ FAILED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
- test = c.fail('[ FAILED ]') .. ' %s\n',
+ header = c.fail('FAILED ') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
+ test = c.fail('FAILED ') .. ' %s\n',
footer = ' ' .. c.nmbr('%d') .. ' FAILED %s\n',
},
error = {
- header = c.errr('[ ERROR ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
- test = c.errr('[ ERROR ]') .. ' %s\n',
+ header = c.errr('ERROR ') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n',
+ test = c.errr('ERROR ') .. ' %s\n',
footer = ' ' .. c.nmbr('%d') .. ' %s\n',
},
}
@@ -193,6 +194,9 @@ return function(options)
io.write(globalTeardown)
io.write(suiteEndString:format(testCount, tests, fileCount, files, elapsedTime_ms))
io.write(getSummaryString())
+ if failureCount > 0 or errorCount > 0 then
+ io.write(global_helpers.read_nvim_log(nil, true))
+ end
io.flush()
return nil, true