llvm-project/clang/test/InstallAPI/umbrella-headers-unix.test
Cyndy Ishida 6ad1cf3b37
[InstallAPI] Add *umbrella-header options (#86587)
Umbrella headers are a concept for Darwin-based libraries. They allow
framework authors to control the order in which their headers should be
parsed and allow clients to access available headers by including a
single header.

InstallAPI will attempt to find the umbrella based on the name of the
framework. Users can also specify this explicitly by using command line
options specifying the umbrella header by file path. There can be an
umbrella header per access level.
2024-03-27 12:34:21 -04:00

41 lines
1.3 KiB
Plaintext

// UNSUPPORTED: system-windows
; RUN: rm -rf %t
; RUN: split-file %s %t
; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
; RUN: mkdir %t/Frameworks/
; RUN: cp -r %S/Inputs/Umbrella/Umbrella.framework %t/Frameworks/
// Only validate path based input that rely on regex matching on unix based file systems.
; RUN: clang-installapi --target=arm64-apple-macosx13 \
; RUN: -install_name /System/Library/Frameworks/Umbrella2.framework/Versions/A/Umbrella \
; RUN: -ObjC -F%t/Frameworks/ %t/inputs.json \
; RUN: --public-umbrella-header=%t/Frameworks/Umbrella.framework/Headers/SpecialUmbrella.h \
; RUN: -private-umbrella-header \
; RUN: %t/Frameworks/Umbrella.framework/PrivateHeaders/SpecialPrivateUmbrella.h \
; RUN: -o %t/output.tbd 2>&1 | FileCheck -allow-empty %s
; CHECK-NOT: error
; CHECK-NOT: warning
;--- inputs.json.in
{
"headers": [ {
"path" : "DSTROOT/Frameworks/Umbrella.framework/Headers/AAA.h",
"type" : "public"
},
{
"path" : "DSTROOT/Frameworks/Umbrella.framework/Headers/SpecialUmbrella.h",
"type" : "public"
},
{
"path" : "DSTROOT/Frameworks/Umbrella.framework/PrivateHeaders/AAA_Private.h",
"type" : "private"
},
{
"path" : "DSTROOT/Frameworks/Umbrella.framework/PrivateHeaders/SpecialPrivateUmbrella.h",
"type" : "private"
}],
"version": "3"
}