add test for --eval; fix a minor bug (#16224)
This commit is contained in:
parent
9fa5826d62
commit
84f2ad3068
2 changed files with 7 additions and 0 deletions
|
|
@ -216,3 +216,9 @@ mmain.html
|
|||
let file = testsDir / "misc/mimportc.nim"
|
||||
let cmd = fmt"{nim} r -b:cpp --hints:off --nimcache:{nimcache} --warningAsError:ProveInit {file}"
|
||||
check execCmdEx(cmd) == ("witness\n", 0)
|
||||
|
||||
block: # nim --eval
|
||||
let opt = "--hints:off"
|
||||
check fmt"""{nim} {opt} --eval:"echo defined(nimscript)"""".execCmdEx == ("true\n", 0)
|
||||
check fmt"""{nim} r {opt} --eval:"echo defined(c)"""".execCmdEx == ("true\n", 0)
|
||||
check fmt"""{nim} r -b:js {opt} --eval:"echo defined(js)"""".execCmdEx == ("true\n", 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue