brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · f6addd8 Raw
43 lines · plain
1## Create a clean temporary directory and cd to it to use relative paths.2# RUN: rm -rf %t && mkdir %t && cd %t3 4## Check that tools correctly treat paths after '--' as file paths,5## even if they start with dashes.6# RUN: yaml2obj %s -o test-obj7# RUN: llvm-objcopy --only-section=.test test-obj -- --only-section8# RUN: llvm-objcopy --only-section=.test test-obj out-obj19# RUN: cmp -- out-obj1 --only-section10 11# RUN: cp -- test-obj --strip-symbol12# RUN: cp -- test-obj strip-obj113# RUN: llvm-strip --remove-section=.test strip-obj1 -- --strip-symbol14# RUN: cp -- test-obj no-dash-dash115# RUN: llvm-strip --remove-section=.test no-dash-dash116# RUN: cmp -- no-dash-dash1 strip-obj117# RUN: cmp -- no-dash-dash1 --strip-symbol18 19## Check the case when '--' is specified with input files but no options.20# RUN: llvm-objcopy -- test-obj --add-section21# RUN: llvm-objcopy test-obj out-obj222# RUN: cmp -- out-obj2 --add-section23 24# RUN: cp -- test-obj --keep-symbol25# RUN: cp -- test-obj strip-obj226# RUN: llvm-strip -- strip-obj2 --keep-symbol27# RUN: cp -- test-obj no-dash-dash228# RUN: llvm-strip no-dash-dash229# RUN: cmp -- no-dash-dash2 strip-obj230# RUN: cmp -- no-dash-dash2 --keep-symbol31 32## Check the case when '--' is specified with options but no input files.33# RUN: not llvm-objcopy --only-section=.test -- 2>&1 | FileCheck %s --check-prefixes=CHECK-NO-INPUT34# RUN: not llvm-strip --remove-section=.test -- 2>&1 | FileCheck %s --check-prefixes=CHECK-NO-INPUT35 36# CHECK-NO-INPUT: error: no input file specified37 38--- !ELF39FileHeader:40  Class: ELFCLASS6441  Data:  ELFDATA2LSB42  Type:  ET_REL43