47 lines · plain
1## This test checks that an error is thrown in case of invalid input/output args.2 3## Missing input file:4# RUN: not llvm-libtool-darwin -static -o %t.lib 2>&1 | \5# RUN: FileCheck %s --check-prefix=NO-INPUT6 7# NO-INPUT: error: no input files specified8 9## Missing output file:10# RUN: not llvm-libtool-darwin -static %t.input 2>&1 | \11# RUN: FileCheck %s --check-prefix=NO-OUTPUT12 13# NO-OUTPUT: -o option: must be specified14 15## Missing argument to -o:16# RUN: not llvm-libtool-darwin -static %t.input -o 2>&1 | \17# RUN: FileCheck %s --check-prefix=MISSING18 19# MISSING: -o: missing argument20 21## Input file not found:22# RUN: not llvm-libtool-darwin -static -o %t.lib %t.missing 2>&1 | \23# RUN: FileCheck %s --check-prefix=NO-FILE -DFILE=%t.missing -DMSG=%errc_ENOENT24 25# NO-FILE: error: '[[FILE]]': [[MSG]]26 27## Input file is not an object file:28# RUN: touch %t.invalid29# RUN: not llvm-libtool-darwin -static -o %t.lib %t.invalid 2>&1 | \30# RUN: FileCheck %s --check-prefix=NOT-OBJECT -DFILE=%basename_t.tmp.invalid31 32# NOT-OBJECT: error: '[[FILE]]': The file was not recognized as a valid object file33 34## Input file is not a Mach-O object file:35# RUN: yaml2obj %s -o %t.elf36# RUN: not llvm-libtool-darwin -static -o %t.lib %t.elf 2>&1 | \37# RUN: FileCheck %s --check-prefix=NOT-MACHO -DFILE=%basename_t.tmp.elf38 39# NOT-MACHO: error: '[[FILE]]': format not supported40 41--- !ELF42FileHeader:43 Class: ELFCLASS6444 Data: ELFDATA2LSB45 Type: ET_REL46 Machine: EM_X86_6447