summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorcheatfate <ka@hardcore.kiev.ua>2016-09-04 01:22:04 +0300
committercheatfate <ka@hardcore.kiev.ua>2016-09-04 01:22:04 +0300
commit015e22c8c0adc181992eede09acd8df24b488180 (patch)
tree6fcba50fc898eebc9802963f28e94552cbdc8f7e
parente70f02787028c521e1aad41fe9f2fe3d05af0528 (diff)
downloadNim-015e22c8c0adc181992eede09acd8df24b488180.tar.gz
Add upcoming/asyncdispatch.nim to tests.
-rw-r--r--tests/async/config.nims2
-rw-r--r--tests/testament/categories.nim10
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/async/config.nims b/tests/async/config.nims
new file mode 100644
index 000000000..97c2e0aa4
--- /dev/null
+++ b/tests/async/config.nims
@@ -0,0 +1,2 @@
+when defined(upcoming):
+  patchFile("stdlib", "asyncdispatch", "$lib/upcoming/asyncdispatch")
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index 29b6d9aba..f250d8a45 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -202,6 +202,14 @@ proc ioTests(r: var TResults, cat: Category, options: string) =
   testSpec c, makeTest("tests/system/helpers/readall_echo", options, cat)
   testSpec r, makeTest("tests/system/io", options, cat)
 
+# ------------------------- async tests ---------------------------------------
+proc asyncTests(r: var TResults, cat: Category, options: string) =
+  template test(filename: untyped) =
+    testSpec r, makeTest(filename, options, cat)
+    testSpec r, makeTest(filename, options & " -d:upcoming_async", cat)
+  for t in os.walkFiles("tests/async/t*.nim"):
+    test(t)
+
 # ------------------------- debugger tests ------------------------------------
 
 proc debuggerTests(r: var TResults, cat: Category, options: string) =
@@ -390,6 +398,8 @@ proc processCategory(r: var TResults, cat: Category, options: string, fileGlob:
     threadTests r, cat, options & " --threads:on"
   of "io":
     ioTests r, cat, options
+  of "async":
+    asyncTests r, cat, options
   of "lib":
     testStdlib(r, "lib/pure/*.nim", options, cat)
     testStdlib(r, "lib/packages/docutils/highlite", options, cat)