llvm/llvm/test/tools/llvm-readtapi/compare-flags.test

; RUN: rm -rf %t
; RUN: split-file %s %t  
; RUN: not llvm-readtapi --compare %t/tbdv4.tbd  %t/tbdv5.tbd -o %t/output.txt 2>&1 | FileCheck %s --allow-empty 
; RUN: FileCheck %s --check-prefix FILEOUT <  %t/output.txt 

; CHECK-NOT: error: 
; CHECK-NOT: warning: 

; FILEOUT: < {{.*}}tbdv4.tbd
; FILEOUT: > {{.*}}tbdv5.tbd

; FILEOUT:      Two Level Namespace
; FILEOUT-NEXT:         < true
; FILEOUT-NEXT:         > false
; FILEOUT-NEXT: Shared Cache Ineligible
; FILEOUT-NEXT:         < true
; FILEOUT-NEXT:         > false



//--- tbdv4.tbd
--- !tapi-tbd
tbd-version:     4
targets:         [ arm64-macos ]
flags:           [ not_app_extension_safe, not_for_dyld_shared_cache ]
install-name:    '/usr/lib/libFake.dylib'
...

//--- tbdv5.tbd
{
    "main_library": {
        "flags": [
            {
                "attributes": [
                    "not_app_extension_safe",
                    "flat_namespace"
                ]
            }
        ],
        "install_names": [
            {
                "name": "/usr/lib/libFake.dylib"
            }
        ],
        "target_info": [
            {
                "min_deployment": "13",
                "target": "arm64-macos"
            }
        ]
    },
    "tapi_tbd_version": 5
}