1 ## This test checks that an error is thrown in case of invalid input/output args.
4 # RUN: not llvm-libtool-darwin -static -o %t.lib 2>&1 | \
5 # RUN: FileCheck %s --check-prefix=NO-INPUT
7 # NO-INPUT: error: no input files specified
9 ## Missing output file:
10 # RUN: not llvm-libtool-darwin -static %t.input 2>&1 | \
11 # RUN: FileCheck %s --check-prefix=NO-OUTPUT
13 # NO-OUTPUT: -o option: must be specified
15 ## Missing argument to -o:
16 # RUN: not llvm-libtool-darwin -static %t.input -o 2>&1 | \
17 # RUN: FileCheck %s --check-prefix=MISSING
19 # MISSING: -o: missing argument
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_ENOENT
25 # NO-FILE: error: '[[FILE]]': [[MSG]]
27 ## Input file is not an object file:
28 # RUN: touch %t.invalid
29 # 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.invalid
32 # NOT-OBJECT: error: '[[FILE]]': The file was not recognized as a valid object file
34 ## Input file is not a Mach-O object file:
35 # RUN: yaml2obj %s -o %t.elf
36 # 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.elf
39 # NOT-MACHO: error: '[[FILE]]': format not supported