1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vccheck-md: add play and play-test command (#17350)

This commit is contained in:
Petr Makhnev 2023-02-18 22:55:10 +04:00 committed by GitHub
parent 93a3f5ff7d
commit d971d93066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,6 +598,10 @@ fn (mut f MDFile) check_examples() CheckResult {
oks++ oks++
} }
'nofmt' {} 'nofmt' {}
// mark the example as playable inside docs
'play' {}
// same as play, but run example as a test
'play-test' {}
else { else {
eprintln(eline(f.path, e.sline, 0, 'unrecognized command: "${command}", use one of: wip/ignore/compile/failcompile/okfmt/nofmt/oksyntax/badsyntax/cgen/globals/live/shared')) eprintln(eline(f.path, e.sline, 0, 'unrecognized command: "${command}", use one of: wip/ignore/compile/failcompile/okfmt/nofmt/oksyntax/badsyntax/cgen/globals/live/shared'))
should_cleanup_vfile = false should_cleanup_vfile = false