diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-04-29 02:25:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 02:25:08 -0700 |
commit | 87229e272ecd4012b750215d35e914580cd8475c (patch) | |
tree | 702ba3527005028375e51af9322fe38aa7457af9 /tests/misc/trunner.nim | |
parent | 016a8ccd7a8a018b28e8f424085c178d96860c6c (diff) | |
download | Nim-87229e272ecd4012b750215d35e914580cd8475c.tar.gz |
fix #17853 (ascii message separator broke json nim dump) (#17887)
Diffstat (limited to 'tests/misc/trunner.nim')
-rw-r--r-- | tests/misc/trunner.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim index 06c828eaa..014373dfb 100644 --- a/tests/misc/trunner.nim +++ b/tests/misc/trunner.nim @@ -71,6 +71,7 @@ ret=[s1:foobar s2:foobar age:25 pi:3.14] else: # don't run twice the same test import std/strutils + import std/json template check2(msg) = doAssert msg in output, output block: # tests with various options `nim doc --project --index --docroot` @@ -317,3 +318,13 @@ compiling: v3 running: v3 running: v2 """, ret + + block: # nim dump + let cmd = fmt"{nim} dump --dump.format:json -d:D20210428T161003 --hints:off ." + let (ret, status) = execCmdEx(cmd) + doAssert status == 0 + let j = ret.parseJson + # sanity checks + doAssert "D20210428T161003" in j["defined_symbols"].to(seq[string]) + doAssert j["version"].to(string) == NimVersion + doAssert j["nimExe"].to(string) == getCurrentCompilerExe() |