1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/tools/llvm-ar/invalid-object-file.test
Sam Clegg 0c3847c076 llvm-ranlib/nm: Don't print usage message except for usage errors
Also, fix a bug in ranlib where it didn't correctly detect being run
without any argument and would try to operate on the empty string.

Differential Revision: https://reviews.llvm.org/D70021
2019-11-08 15:17:07 -08:00

12 lines
429 B
Plaintext

## 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