summary refs log tree commit diff stats
path: root/tests/parallel/tlet_spawn.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parallel/tlet_spawn.nim')
-rw-r--r--tests/parallel/tlet_spawn.nim16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/parallel/tlet_spawn.nim b/tests/parallel/tlet_spawn.nim
index 463ee1a47..853ffc443 100644
--- a/tests/parallel/tlet_spawn.nim
+++ b/tests/parallel/tlet_spawn.nim
@@ -1,5 +1,10 @@
+discard """
+output: '''
+done999 999
+'''
+"""
 
-import threadpool
+import std/[threadpool, os]
 
 proc foo(): int = 999
 
@@ -12,3 +17,12 @@ proc main =
   echo "done", f, " ", b
 
 main()
+
+# bug #13781
+proc thread(): string =
+  os.sleep(1000)
+  return "ok"
+
+var fv = spawn thread()
+sync()
+doAssert ^fv == "ok"