## Test the JSON pretty-print flag. # # RUN: yaml2obj %s -o %t.pretty ## Test JSON with pretty-print off. # RUN: llvm-readobj --elf-output-style=JSON %t.pretty | \ # RUN: FileCheck %s --check-prefix=NO-PRETTY \ # RUN: --strict-whitespace --implicit-check-not={{.}} # NO-PRETTY:[ # NO-PRETTY-SAME:{ # NO-PRETTY-SAME:"{{.*}}.pretty":{ # NO-PRETTY-SAME:"FileSummary":{ # NO-PRETTY-SAME:"File":"{{.*}}.pretty", # NO-PRETTY-SAME:"Format":"elf64-x86-64", # NO-PRETTY-SAME:"Arch":"x86_64", # NO-PRETTY-SAME:"AddressSize":"64bit", # NO-PRETTY-SAME:"LoadName":"<Not found>" # NO-PRETTY-SAME:} # NO-PRETTY-SAME:} # NO-PRETTY-SAME:} # NO-PRETTY-SAME:] ## Test JSON with pretty-print on. # RUN: llvm-readobj --elf-output-style=JSON --pretty-print %t.pretty | \ # RUN: FileCheck %s --check-prefix=PRETTY \ # RUN: --match-full-lines --strict-whitespace --implicit-check-not={{.}} # PRETTY:[ # PRETTY-NEXT: { # PRETTY-NEXT: "{{.*}}.pretty": { # PRETTY-NEXT: "FileSummary": { # PRETTY-NEXT: "File": "{{.*}}.pretty", # PRETTY-NEXT: "Format": "elf64-x86-64", # PRETTY-NEXT: "Arch": "x86_64", # PRETTY-NEXT: "AddressSize": "64bit", # PRETTY-NEXT: "LoadName": "<Not found>" # PRETTY-NEXT: } # PRETTY-NEXT: } # PRETTY-NEXT: } # PRETTY-NEXT:] --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_X86_64