aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-find-syms.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test-find-syms.c b/test/test-find-syms.c
new file mode 100644
index 0000000..0ad033d
--- /dev/null
+++ b/test/test-find-syms.c
@@ -0,0 +1,13 @@
+#include <substitute.h>
+#include <stdio.h>
+#include <assert.h>
+#include <dlfcn.h>
+
+int main() {
+ const char *foundation = "/System/Library/Frameworks/Foundation.framework/Foundation";
+ dlopen(foundation, RTLD_LAZY);
+ const char *names[] = { "_setshortValueWithMethod" };
+ substitute_sym *syms[1];
+ assert(!substitute_find_syms(foundation, names, syms, 1));
+ printf("%p\n", syms[0]);
+}