aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2019-01-24 22:44:16 -0600
committergenotrance <dev@genotrance.com>2019-01-27 22:05:54 -0600
commitd8c75a43f725ca3fc4111a55587ce5ca69d024e9 (patch)
tree8e770cfd35219b37517c4731056a1e34d9640fc6 /tests
parentf367234ca5da349a00982e6a7d70fdcd80404141 (diff)
downloadnimterop-d8c75a43f725ca3fc4111a55587ce5ca69d024e9.tar.gz
nimterop-d8c75a43f725ca3fc4111a55587ce5ca69d024e9.zip
Plugin support
Diffstat (limited to 'tests')
-rw-r--r--tests/tnimterop_c.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim
index f0d5ed5..095fe20 100644
--- a/tests/tnimterop_c.nim
+++ b/tests/tnimterop_c.nim
@@ -8,6 +8,13 @@ cDefine("FORCE")
cIncludeDir "$projpath/include"
cAddSearchDir "$projpath/include"
cCompile cSearchPath("test.c")
+
+cPlugin:
+ import strutils
+
+ proc onSymbol*(sym: string): string {.exportc, dynlib.} =
+ return sym.strip(chars={'_'})
+
cImport cSearchPath "test.h"
check TEST_INT == 512