summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-21 23:06:50 +0800
committerruki <[email protected]>2021-10-21 23:06:50 +0800
commit3c5a1cc28b28bab2f714dd4ec163a6f2b1f61cae (patch)
tree166b77f484136db9e33459f4ee64389ba8f8f1ea /tests
parentcc00b3574b5892f191cef90f81acd3c27b548ff8 (diff)
add more nim tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/projects/nim/console_with_c/src/mainbin92184 -> 0 bytes
-rw-r--r--tests/projects/nim/console_with_packages/src/main.nim3
-rw-r--r--tests/projects/nim/console_with_packages/xmake.lua8
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/projects/nim/console_with_c/src/main b/tests/projects/nim/console_with_c/src/main
deleted file mode 100755
index 84f0819ac..000000000
--- a/tests/projects/nim/console_with_c/src/main
+++ /dev/null
Binary files differ
diff --git a/tests/projects/nim/console_with_packages/src/main.nim b/tests/projects/nim/console_with_packages/src/main.nim
new file mode 100644
index 000000000..a3368303a
--- /dev/null
+++ b/tests/projects/nim/console_with_packages/src/main.nim
@@ -0,0 +1,3 @@
+proc zlibVersion(): cstring {.cdecl, importc}
+
+echo zlibVersion()
diff --git a/tests/projects/nim/console_with_packages/xmake.lua b/tests/projects/nim/console_with_packages/xmake.lua
new file mode 100644
index 000000000..924ee9632
--- /dev/null
+++ b/tests/projects/nim/console_with_packages/xmake.lua
@@ -0,0 +1,8 @@
+add_rules("mode.debug", "mode.release")
+
+add_requires("zlib")
+
+target("test")
+ set_kind("binary")
+ add_files("src/main.nim")
+ add_packages("zlib")