45 lines · yaml
1## We have a special "<none>" value for all keys that are implemented2## as Optional<> in the code. Setting a key to "<none>" means no-op and3## works in the same way as when a field was not specified at all.4 5## Test a few keys for which the "<none>" value is supported.6## We do not test all possible keys, because it would be too verbose.7## It reasonable to test all keys for a section, because normally many8## of them would conflict or intersect when specified together.9# RUN: yaml2obj %s --docnum=1 -o %t-none10# RUN: yaml2obj %s --docnum=2 -o %t-base11# RUN: cmp %t-none %t-base12 13## We do not use the TEST macro. It exists to14## demonstrate the expected use case for the <none> word.15--- !ELF16FileHeader:17 Class: ELFCLASS6418 Data: ELFDATA2LSB19 Type: ET_REL20Sections:21 - Name: .bar22 Type: SHT_PROGBITS23 Flags: [[TEST=<none>]] ## Comment24 Offset: [[TEST=<none>]]25 Address: [[TEST=<none>]]26 Content: [[TEST=<none>]]27 Size: [[TEST=<none>]]28 ContentArray: [[TEST=<none>]]29 Info: [[TEST=<none>]]30 EntSize: [[TEST=<none>]]31 ShName: [[TEST=<none>]]32 ShOffset: [[TEST=<none>]]33 ShSize: [[TEST=<none>]]34 ShFlags: [[TEST=<none>]]35 36## The same document, but all fields that were set to <none> are removed.37--- !ELF38FileHeader:39 Class: ELFCLASS6440 Data: ELFDATA2LSB41 Type: ET_REL42Sections:43 - Name: .bar44 Type: SHT_PROGBITS45