]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/env-DYLD_FRAMEWORK_PATH.dtest/main.c
8a2b4f659456f603223a7a9ff1bd0f8fe2c29b87
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/env-DYLD_FRAMEWORK_PATH.exe $BUILD_DIR/Frameworks/Foo.framework/Foo
6 // BUILD: $DYLD_ENV_VARS_ENABLE $BUILD_DIR/env-DYLD_FRAMEWORK_PATH.exe
8 // RUN: ./env-DYLD_FRAMEWORK_PATH.exe
9 // RUN: DYLD_FRAMEWORK_PATH=$RUN_DIR/Frameworks-alt/ ./env-DYLD_FRAMEWORK_PATH.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");