]> git.saurik.com Git - apple/dyld.git/blame - unit-tests/test-cases/env-DYLD_FALLBACK_LIBRARY_PATH/main.c
dyld-239.4.tar.gz
[apple/dyld.git] / unit-tests / test-cases / env-DYLD_FALLBACK_LIBRARY_PATH / main.c
CommitLineData
39a8cd10
A
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <dlfcn.h>
5
6#include "test.h"
7
8extern void compress();
9
10int main(int argc, const char* argv[])
11{
12#if !SHOULD_FAIL
13 Dl_info info;
14 if ( dladdr(&compress, &info) ) {
15 //fprintf(stderr, "_compress found in %s\n", info.dli_fname);
16 if ( strstr(info.dli_fname, argv[1]) != 0 ) {
17 PASS("env-DYLD_FALLBACK_LIBRARY_PATH");
18 exit(0);
19 }
20 }
21 FAIL("env-DYLD_FALLBACK_LIBRARY_PATH");
22#endif
23 return EXIT_SUCCESS;
24}