93 lines · plain
1## The END MRI command is optional. Scripts that omit2## or include END should be handled by llvm-ar.3 4# RUN: rm -rf %t && split-file %s %t5# RUN: cd %t6 7# RUN: yaml2obj %S/Inputs/elf.yaml -o elf.o8 9## Empty file.10# RUN: touch empty.mri11# RUN: llvm-ar -M < empty.mri12# RUN: llvm-ar -M < empty-end.mri13 14## Comment only.15# RUN: llvm-ar -M < comment.mri16# RUN: llvm-ar -M < comment-end.mri17 18## Without SAVE.19# RUN: llvm-ar -M < no-save.mri20# RUN: test ! -e no-save.ar21 22# RUN: llvm-ar -M < no-save-end.mri23# RUN: test ! -e no-save-end.ar24 25## With SAVE.26# RUN: llvm-ar -M < save.mri27# RUN: llvm-ar t save.ar | FileCheck %s28 29# RUN: llvm-ar -M < save-end.mri30# RUN: llvm-ar t save-end.ar | FileCheck %s31 32## Duplicate use of END.33# RUN: llvm-ar -M < duplicate-end-no-save.mri34# RUN: test ! -e duplicate-end-no-save.ar35 36# RUN: llvm-ar -M < duplicate-end-save.mri37# RUN: llvm-ar t duplicate-end-save.ar | FileCheck %s38 39## Use of END before saving.40# RUN: llvm-ar -M < end-before-save.mri41# RUN: llvm-ar t end-before-save.ar | FileCheck %s42 43# CHECK: elf.o44 45#--- empty-end.mri46END47 48#--- comment.mri49; a comment50 51#--- comment-end.mri52; a comment53END54 55#--- no-save.mri56create no-save.ar57addmod elf.o58 59#--- no-save-end.mri60create no-save-end.ar61addmod elf.o62END63 64#--- save.mri65create save.ar66addmod elf.o67save68 69#--- save-end.mri70create save-end.ar71addmod elf.o72save73end74 75#--- duplicate-end-no-save.mri76create duplicate-end-no-save.ar77addmod elf.o78END79END80 81#--- duplicate-end-save.mri82create duplicate-end-save.ar83addmod elf.o84save85END86END87 88#--- end-before-save.mri89create end-before-save.ar90addmod elf.o91end92save93