summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authordom96 <dominikpicheta@googlemail.com>2011-11-04 00:22:04 +0000
committerdom96 <dominikpicheta@googlemail.com>2011-11-04 00:22:04 +0000
commit264de4537ef5b24986789ff3c858f6cb113913f9 (patch)
tree4b7886d058809ac9449160ee0dfe4352aca0be0f /tests
parentd819350145a66cea793c359a4782d3b137c17dd2 (diff)
downloadNim-264de4537ef5b24986789ff3c858f6cb113913f9.tar.gz
Added ftpclient module. Fixed docs in sockets module. Added dll tests to test suite.
Diffstat (limited to 'tests')
-rw-r--r--tests/dll/dllsimple.nim5
-rwxr-xr-xtests/tester.nim10
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/dll/dllsimple.nim b/tests/dll/dllsimple.nim
new file mode 100644
index 000000000..3f359cd52
--- /dev/null
+++ b/tests/dll/dllsimple.nim
@@ -0,0 +1,5 @@
+discard """
+  file: tdllgen.nim
+"""
+proc test() {.exportc.} =
+  echo("Hello World!")
diff --git a/tests/tester.nim b/tests/tester.nim
index 8d9df2824..071561b30 100755
--- a/tests/tester.nim
+++ b/tests/tester.nim
@@ -323,6 +323,15 @@ proc compileRodFiles(r: var TResults, options: string) =
 
 # -----------------------------------------------------------------------------
 
+# DLL generation tests
+proc testDLLGen(r: var TResults, options: string) =
+  compileSingleTest(r, "lib/nimrtl.nim", "--app:lib -d:createNimRtl")
+  
+  template test(filename: expr): stmt =
+    compileSingleTest(r, "tests/dll/" / filename, options)
+  
+  test "dllsimple.nim"
+   
 proc compileExample(r: var TResults, pattern, options: string) =
   for test in os.walkFiles(pattern): compileSingleTest(r, test, options)
 
@@ -360,6 +369,7 @@ proc main(action: string) =
     compile(compileRes, "tests/accept/compile/t*.nim", options)
     compile(compileRes, "tests/ecmas.nim", options)
     compileRodFiles(compileRes, options)
+    testDllGen(compileRes, options)
     writeResults(compileJson, compileRes)
   of "examples":
     var compileRes = readResults(compileJson)