#include <stdio.h>
#include <stdlib.h>
#include <mach-o/dyld_priv.h>
int main()
{
printf("[BEGIN] dyld_need_closure\n");
if ( !dyld_need_closure("./foo.exe", "/tmp/Containers/Data/") ) {
printf("[FAIL] dyld_closure: Should have needed a closure for containerised path\n");
return 0;
}
if ( dyld_need_closure("./foo.exe", "/tmp/Containers/Data2/") ) {
printf("[FAIL] dyld_closure: Should have rejected a closure for non-containerised path\n");
return 0;
}
printf("[PASS] dyld_need_closure\n");
return 0;
}