summary refs log tree commit diff stats
path: root/tests/misc/trunner.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/trunner.nim')
-rw-r--r--tests/misc/trunner.nim17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim
index 626b1a886..6e5487d1b 100644
--- a/tests/misc/trunner.nim
+++ b/tests/misc/trunner.nim
@@ -224,13 +224,15 @@ sub/mmain.idx""", context
     doAssert exitCode == 0, msg
 
     let data = parseJson(readFile(output))["entries"]
-    doAssert data.len == 4
+    doAssert data.len == 5
     let doSomething = data[0]
     doAssert doSomething["name"].getStr == "doSomething"
     doAssert doSomething["type"].getStr == "skProc"
     doAssert doSomething["line"].getInt == 1
     doAssert doSomething["col"].getInt == 0
     doAssert doSomething["code"].getStr == "proc doSomething(x, y: int): int {.raises: [], tags: [], forbids: [].}"
+    let foo2 = data[4]
+    doAssert $foo2["signature"] == """{"arguments":[{"name":"x","type":"T"},{"name":"y","type":"U"},{"name":"z","type":"M"}],"genericParams":[{"name":"T","types":"int"},{"name":"M","types":"string"},{"name":"U"}]}"""
 
   block: # nim jsondoc # bug #11953
     let file = testsDir / "misc/mjsondoc.nim"
@@ -241,7 +243,7 @@ sub/mmain.idx""", context
     doAssert exitCode == 0, msg
 
     let data = parseJson(readFile(destDir / "mjsondoc.json"))["entries"]
-    doAssert data.len == 4
+    doAssert data.len == 5
     let doSomething = data[0]
     doAssert doSomething["name"].getStr == "doSomething"
     doAssert doSomething["type"].getStr == "skProc"
@@ -271,10 +273,13 @@ sub/mmain.idx""", context
     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)
+    when not defined(windows):
+      # This never worked reliably on Windows. Needs further investigation but it is hard to reproduce.
+      # Looks like a mild stack corruption when bailing out of nested exception handling.
+      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