thinca / vim-themis

A testing framework for Vim script.
zlib License
238 stars 34 forks source link

Include :messages in failure output #71

Open flwyd opened 2 years ago

flwyd commented 2 years ago

Is your feature request related to a problem?

One of my tests is failing. The function reports possible problems using a logger that basically does echomsg. I would like to see those log statements to troubleshoot the test, but the themis command just reports that my function returned an empty list instead of my expected value.

Describe the solution you'd like

It would be nice if there was an option to include the output of :messages (with the exception of the Maintainer line at the beginning) along with the assertion errors in the reporter output for failing tests.

This could be accomplished with something like calling messages clear before each test, then capturing messages after the test with

let save_reg = getreg('m')
redir @m
silent messages
redir END
call setreg('m', save_reg)