ci/tools: check-md.v: add support for "```v live"

pull/6832/head
Delyan Angelov 2020-11-14 20:02:10 +02:00
parent 01a5b263e5
commit b96a0246b5
2 changed files with 12 additions and 1 deletions

View File

@ -178,6 +178,17 @@ fn (mut f MDFile) check_examples() (int, int) {
} }
oks++ oks++
} }
'live' {
res := os.system('"$vexe" -silent -live -o x.c $vfile')
if res != 0 {
eprintln(eline(f.path, e.sline, 0, 'example failed to compile with -live'))
eprintln(vcontent)
should_cleanup_vfile = false
errors++
continue
}
oks++
}
'failcompile' { 'failcompile' {
res := os.system('"$vexe" -silent -o x.c $vfile') res := os.system('"$vexe" -silent -o x.c $vfile')
os.rm('x.c') or { } os.rm('x.c') or { }

View File

@ -2937,7 +2937,7 @@ Translating it to V gives you several advantages:
## Hot code reloading ## Hot code reloading
```v ```v live
module main module main
import time import time