@@ -133,7 +133,7 @@ function! s:RunTest(Callback, bufnr, codeElements) abort
133133 let tests = s: FindTests (a: codeElements )
134134 let currentTest = s: FindTest (tests)
135135 if type (currentTest) != type ({})
136- echohl WarningMsg | echom ' No test found' | echohl None
136+ echohl WarningMsg | echomsg ' No test found' | echohl None
137137 let s: runningTest = 0
138138 return
139139 endif
@@ -157,7 +157,7 @@ function! s:RunTestsRH(Callback, bufnr, tests, response) abort
157157 if ! a: response .Success | return | endif
158158 if type (a: response .Body.Results) != type ([])
159159 echohl WarningMsg
160- echom ' Error: "' . a: response .Body.Failure .
160+ echomsg ' Error: "' . a: response .Body.Failure .
161161 \ ' " - this may indicate a failed build'
162162 echohl None
163163 return
@@ -172,6 +172,15 @@ function! s:RunTestsRH(Callback, bufnr, tests, response) abort
172172 \ ' filename' : bufname (a: bufnr ),
173173 \ ' name' : substitute (result.MethodName, ' ^.*\.' , ' ' , ' ' )
174174 \}
175+ " Write any standard output to message-history
176+ if len (get (result, ' StandardOutput' , []))
177+ echomsg ' Standard output from test ' . location.name . ' :'
178+ for output in result.StandardOutput
179+ for line in split (trim (output), ' \r\?\n' , 1 )
180+ echomsg ' ' . line
181+ endfor
182+ endfor
183+ endif
175184 if result.Outcome = ~? ' failed'
176185 let location.type = ' E'
177186 let location.text = location.name . ' : ' . result.ErrorMessage
@@ -209,7 +218,7 @@ function! s:DebugTest(Callback, bufnr, codeElements) abort
209218 let tests = s: FindTests (a: codeElements )
210219 let currentTest = s: FindTest (tests)
211220 if type (currentTest) != type ({})
212- echohl WarningMsg | echom ' No test found' | echohl None
221+ echohl WarningMsg | echomsg ' No test found' | echohl None
213222 let s: runningTest = 0
214223 return
215224 endif
@@ -282,7 +291,7 @@ function! s:RunTestsInFiles(Callback, bufferCodeStructures) abort
282291 endif
283292 endfor
284293 if len (Requests) == 0
285- echohl WarningMsg | echom ' No tests found' | echohl None
294+ echohl WarningMsg | echomsg ' No tests found' | echohl None
286295 let s: runningTest = 0
287296 return
288297 endif
0 commit comments