26 lines · plain
1## Test the -V flag, which prints the version number to stdout. It also allows2## for no operation to be specified, but if an operation is specified, it should3## still occur and regular argument parsing errors should be surfaced (unlike4## cctools libtool, which silences all argument parsing errors when -V is5## specified).6 7## Test -V by itself.8# RUN: llvm-libtool-darwin -V | FileCheck %s9## The specific version number, vendor string, etc. will differ across10## environments, so this is the most specific we can get.11# CHECK: LLVM version12 13## Parsing errors should not be surfaced when no operation is specified.14# RUN: llvm-libtool-darwin -V -D -U | FileCheck %s15 16## Regular errors should occur when an operation is specified.17# RUN: not llvm-libtool-darwin -V -static 2>&1 | FileCheck --check-prefix=ERROR %s18# ERROR: -o option: must be specified19 20## A valid command line should print the version and perform the operation.21# RUN: yaml2obj %S/Inputs/input1.yaml -o %t-input1.o22# RUN: yaml2obj %S/Inputs/input2.yaml -o %t-input2.o23# RUN: llvm-libtool-darwin -static -o %t.lib %t-input1.o %t-input2.o -V | FileCheck %s24# RUN: llvm-libtool-darwin -static -o %t2.lib %t-input1.o %t-input2.o25# RUN: cmp %t.lib %t2.lib26