* fixes #20149; hintAsError/warningAsError ignores foreign packages * add changelog * fixes the test * remove * fixes tests again * fix * I'm careless Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
This commit is contained in:
parent
c9c1c97f1e
commit
641381e3d4
4 changed files with 14 additions and 8 deletions
2
tests/misc/m20149.nim
Normal file
2
tests/misc/m20149.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let x = 12
|
||||
echo x
|
||||
|
|
@ -249,12 +249,18 @@ sub/mmain.idx""", context
|
|||
let cmd = fmt"{nim} r -b:cpp --hints:off --nimcache:{nimcache} --warningAsError:ProveInit {file}"
|
||||
check execCmdEx(cmd) == ("witness\n", 0)
|
||||
|
||||
block: # bug #20149
|
||||
let file = testsDir / "misc/m20149.nim"
|
||||
let cmd = fmt"{nim} r --hints:off --nimcache:{nimcache} --hintAsError:XDeclaredButNotUsed {file}"
|
||||
check execCmdEx(cmd) == ("12\n", 0)
|
||||
|
||||
block: # bug #15316
|
||||
let file = testsDir / "misc/m15316.nim"
|
||||
let cmd = fmt"{nim} check --hints:off --nimcache:{nimcache} {file}"
|
||||
check execCmdEx(cmd) == ("m15316.nim(1, 15) Error: expression expected, but found \')\'\nm15316.nim(2, 1) Error: expected: \':\', but got: \'[EOF]\'\nm15316.nim(2, 1) Error: expression expected, but found \'[EOF]\'\nm15316.nim(2, 1) " &
|
||||
"Error: expected: \')\', but got: \'[EOF]\'\nError: illformed AST: \n", 1)
|
||||
|
||||
|
||||
block: # config.nims, nim.cfg, hintConf, bug #16557
|
||||
let cmd = fmt"{nim} r --hint:all:off --hint:conf tests/newconfig/bar/mfoo.nim"
|
||||
let (outp, exitCode) = execCmdEx(cmd, options = {poStdErrToStdOut})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue