mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vdoc: improve failed example report
This commit is contained in:
parent
2e3f0b27f0
commit
5058fd7b79
1 changed files with 3 additions and 2 deletions
|
@ -69,8 +69,9 @@ fn (mut vd VDoc) run_examples(dn doc.DocNode) {
|
|||
res := os.execute(cmd)
|
||||
if res.exit_code != 0 {
|
||||
eprintln('${dn_to_location(dn)}:${term.ecolorize(term.red, 'error in documentation example')}')
|
||||
eprintln(' cmd: ${cmd}')
|
||||
eprintln(' result:')
|
||||
eprintln(' cmd: ${cmd}')
|
||||
eprintln(' example line: ${term.colorize(term.bright_yellow, example)}')
|
||||
eprintln(' result:')
|
||||
eprintln(res.output)
|
||||
vd.example_failures++
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue