aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcomex2015-01-10 15:40:42 -0500
committercomex2015-01-10 15:40:42 -0500
commit2ab9357b35d2f8e4e217c570ef8b8c66b7e0a891 (patch)
tree80d6f0442ad95793c70e54a9ae8e10d18a45dfa3 /test
parentnah - this is nice looking but nonportable (diff)
downloadsubstitute-2ab9357b35d2f8e4e217c570ef8b8c66b7e0a891.tar.gz
simplify
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]);
+}