summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-09-04 19:29:29 +0200
committerGitHub <noreply@github.com>2016-09-04 19:29:29 +0200
commit7e86ed00ce322f7f05dbf129e56669165f6febff (patch)
tree1d5ab6dc768e6ecab4c46f6d6d56284141b4f32a
parent63851b2c91162faa20af6f441d5c1cca660af627 (diff)
parent5a1db8af54a227cac8e974734e67f1b2e29821ad (diff)
downloadNim-7e86ed00ce322f7f05dbf129e56669165f6febff.tar.gz
Merge pull request #4706 from cheatfate/testupcoming
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 eaf000f86..3ed2f2196 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", 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)