27 lines · plain
1## Show that the help message for llvm-ranlib can be printed with either the2## long flag -help.3 4# RUN: llvm-ranlib -h | FileCheck %s --check-prefix=HELP5# RUN: llvm-ranlib -help | FileCheck %s --check-prefix=HELP6# RUN: llvm-ranlib --help | FileCheck %s --check-prefix=HELP7# RUN: llvm-ranlib --version | FileCheck %s --check-prefix=VERSION8# RUN: llvm-ranlib -V | FileCheck %s --check-prefix=VERSION9 10## Also check combined options (first -h/-v flag wins)11# RUN: llvm-ranlib -Dh | FileCheck %s --check-prefix=HELP12# RUN: llvm-ranlib -DVh | FileCheck %s --check-prefix=VERSION13# RUN: llvm-ranlib -DhV | FileCheck %s --check-prefix=HELP14 15# HELP: USAGE: llvm-ranlib16# VERSION: version17 18## -v enables verbose output in BSD ranlib and GNU ar but is another alias19## for --version in GNU ranlib. Reject -v.20# RUN: not llvm-ranlib -v 2>&1 | FileCheck %s --check-prefix=ERR121# RUN: not llvm-ranlib -version 2>&1 | FileCheck %s --check-prefix=ERR222# RUN: not llvm-ranlib -Dvh 2>&1 | FileCheck %s --check-prefix=ERR323 24# ERR1: error: Invalid option: '-v'25# ERR2: error: Invalid option: '-version'26# ERR3: error: Invalid option: '-vh'27