aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2020-04-12 12:56:50 -0500
committerGanesh Viswanathan <dev@genotrance.com>2020-04-12 12:56:50 -0500
commit0afb634b59d55ff369bd25d85e13d156c6836db0 (patch)
tree69b06f5388a0b4769cee96534f81fd5e0b7081b7 /tests
parent9cd39600d43c90045b0da6873900881449e6d609 (diff)
downloadnimterop-0afb634b59d55ff369bd25d85e13d156c6836db0.tar.gz
nimterop-0afb634b59d55ff369bd25d85e13d156c6836db0.zip
Fix #181 - cPluginPath()
Diffstat (limited to 'tests')
-rw-r--r--tests/tnimterop_c.nim9
-rw-r--r--tests/tnimterop_c_plugin.nim7
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim
index e78e7f2..0360225 100644
--- a/tests/tnimterop_c.nim
+++ b/tests/tnimterop_c.nim
@@ -11,14 +11,7 @@ cDefine("FORCE")
cIncludeDir testsIncludeDir()
cCompile cSearchPath("test.c")
-cPlugin:
- import strutils
-
- proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
- if sym.name == "_Kernel":
- sym.name = "uKernel"
- else:
- sym.name = sym.name.strip(chars={'_'})
+cPluginPath("tests/tnimterop_c_plugin.nim")
cOverride:
type
diff --git a/tests/tnimterop_c_plugin.nim b/tests/tnimterop_c_plugin.nim
new file mode 100644
index 0000000..68bb4d6
--- /dev/null
+++ b/tests/tnimterop_c_plugin.nim
@@ -0,0 +1,7 @@
+import strutils
+
+proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
+ if sym.name == "_Kernel":
+ sym.name = "uKernel"
+ else:
+ sym.name = sym.name.strip(chars={'_'}) \ No newline at end of file