• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Test the -V flag, which prints the version number to stdout. It also allows
2## for no operation to be specified, but if an operation is specified, it should
3## still occur and regular argument parsing errors should be surfaced (unlike
4## cctools libtool, which silences all argument parsing errors when -V is
5## specified).
6
7## Test -V by itself.
8# RUN: llvm-libtool-darwin -V | FileCheck %s
9## The specific version number, vendor string, etc. will differ across
10## environments, so this is the most specific we can get.
11# CHECK: LLVM version
12
13## Parsing errors should not be surfaced when no operation is specified.
14# RUN: llvm-libtool-darwin -V -D -U | FileCheck %s
15
16## Regular errors should occur when an operation is specified.
17# RUN: not llvm-libtool-darwin -V -static 2>&1 | FileCheck --check-prefix=ERROR %s
18# ERROR: for the -o option: must be specified
19
20## A valid command line should print the version and perform the operation.
21# RUN: yaml2obj %S/Inputs/input1.yaml -o %t-input1.o
22# RUN: yaml2obj %S/Inputs/input2.yaml -o %t-input2.o
23# RUN: llvm-libtool-darwin -static -o %t.lib %t-input1.o %t-input2.o -V | FileCheck %s
24# RUN: llvm-libtool-darwin -static -o %t2.lib %t-input1.o %t-input2.o
25# RUN: cmp %t.lib %t2.lib
26