diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-08-20 04:24:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 16:24:09 -0400 |
commit | 641381e3d47afba95f99efc77bb9a5ed65d07b3a (patch) | |
tree | 00b9392f142af032e92337cd3cc84cc127084003 /tests/misc/trunner.nim | |
parent | c9c1c97f1ec394cc5e7638825d806413b874c080 (diff) | |
download | Nim-641381e3d47afba95f99efc77bb9a5ed65d07b3a.tar.gz |
fixes #20149; fixes #16762; hintAsError and warningAsError now ignore foreign packages (#20151)
* 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>
Diffstat (limited to 'tests/misc/trunner.nim')
-rw-r--r-- | tests/misc/trunner.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim index bc2e872ef..541e3a390 100644 --- a/tests/misc/trunner.nim +++ b/tests/misc/trunner.nim @@ -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}) |