]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dyld_need_closure.dtest/main.c
2 // BUILD: $CC main.c -o $BUILD_DIR/foo.exe
3 // BUILD: $CC main.c -o $BUILD_DIR/dyld_need_closure.exe
5 // RUN: ./dyld_need_closure.exe
9 #include <mach-o/dyld_priv.h>
14 printf("[BEGIN] dyld_need_closure\n");
16 // We only support trying to save to containerised paths, so anything not
17 // of that form should fail
18 if ( !dyld_need_closure("./foo.exe", "/tmp/Containers/Data/") ) {
19 printf("[FAIL] dyld_closure: Should have needed a closure for containerised path\n");
23 if ( dyld_need_closure("./foo.exe", "/tmp/Containers/Data2/") ) {
24 printf("[FAIL] dyld_closure: Should have rejected a closure for non-containerised path\n");
28 printf("[PASS] dyld_need_closure\n");