aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-ar/invalid-object-file.test
blob: f7cdc626662d6962bc34c993f0b7c170a91a2bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
## Test that we get a proper error message with a file that is not a recognized object file.

# RUN: rm -f %t.txt
# RUN: touch %t.txt
# RUN: not llvm-ar sc %t.txt 2>&1 > /dev/null | FileCheck %s -DFILE=%t.txt

# CHECK:     error: unable to load '[[FILE]]': file too small to be an archive
# CHECK-NOT: {{.}}

## Also test that errors like this (e.g. invlid input files) don't generate a usage message
# CHECK-NOT: USAGE: llvm-ar