]>
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>
11 #include "test_support.h"
13 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
14 // We only support trying to save to containerised paths, so anything not
15 // of that form should fail
17 // FIXME: dyld_need_closure() needs an existing directory structure, so we can't run this in BATS
18 // if ( !dyld_need_closure("./foo.exe", "/private/var/mobile/Containers/Data/Application") ) {
19 // FAIL("Should have needed a closure for containerised path");
22 if ( dyld_need_closure("./foo.exe", "/private/var/mobile/Other/Stuff") ) {
23 FAIL("Should have rejected a closure for non-containerised path");