]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/env-DYLD_FRAMEWORK_PATH.dtest/main.c
2 // BUILD: mkdir -p $BUILD_DIR/Frameworks/Foo.framework $BUILD_DIR/Frameworks-alt/Foo.framework
3 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/Frameworks/Foo.framework/Foo -install_name $RUN_DIR/Frameworks/Foo.framework/Foo -DVALUE=1
4 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/Frameworks-alt/Foo.framework/Foo -install_name $RUN_DIR/Frameworks/Foo.framework/Foo -DVALUE=42
5 // BUILD: $CC main.c -o $BUILD_DIR/main.exe $BUILD_DIR/Frameworks/Foo.framework/Foo
6 // BUILD: $DYLD_ENV_VARS_ENABLE $BUILD_DIR/main.exe
9 // RUN: DYLD_FRAMEWORK_PATH=$RUN_DIR/Frameworks-alt/ ./main.exe
18 int expected
= (getenv("DYLD_FRAMEWORK_PATH") != NULL
) ? 42 : 1;
20 printf("[BEGIN] env-DYLD_FRAMEWORK_PATH, expect %d\n", expected
);
22 if ( foo() == expected
)
23 printf("[PASS] env-DYLD_FRAMEWORK_PATH\n");
25 printf("[FAIL] env-DYLD_FRAMEWORK_PATH\n");