summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-ar
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-10-16 18:39:52 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-10-16 18:39:52 +0000
commita86bd22515952c184471c95aaf6273cd6a94505b (patch)
treeff315d88dd24b80e80181d53e3e749c1932488d9 /llvm/test/tools/llvm-ar
parent87cf73e956386a0942137f70a1171c484836341b (diff)
downloadbcm5719-llvm-a86bd22515952c184471c95aaf6273cd6a94505b.tar.gz
bcm5719-llvm-a86bd22515952c184471c95aaf6273cd6a94505b.zip
[llvm-ar] Implement the V modifier as an alias for --version
Summary: Also update the help modifier (h) so that it works as a modifier and not just as a standalone `h`. For example, `llvm-ar h` prints the help message, but `llvm-ar xh` currently prints `unknown option h`. Reviewers: MaskRay, gbreynoo Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69007 llvm-svn: 375028
Diffstat (limited to 'llvm/test/tools/llvm-ar')
-rw-r--r--llvm/test/tools/llvm-ar/help-message.test5
-rw-r--r--llvm/test/tools/llvm-ar/version.test11
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-ar/help-message.test b/llvm/test/tools/llvm-ar/help-message.test
index ed17667291d..8de26d525b0 100644
--- a/llvm/test/tools/llvm-ar/help-message.test
+++ b/llvm/test/tools/llvm-ar/help-message.test
@@ -1,5 +1,10 @@
+## Show that the help message for llvm-ar can be printed with either the long
+## flag -help or with the h modifier.
+
# RUN: llvm-ar h | FileCheck %s
+# RUN: llvm-ar xh | FileCheck %s
# RUN: llvm-ar -h | FileCheck %s
+# RUN: llvm-ar -xh | FileCheck %s
# RUN: llvm-ar -help | FileCheck %s
# RUN: llvm-ar --help | FileCheck %s
diff --git a/llvm/test/tools/llvm-ar/version.test b/llvm/test/tools/llvm-ar/version.test
new file mode 100644
index 00000000000..555e5fdf324
--- /dev/null
+++ b/llvm/test/tools/llvm-ar/version.test
@@ -0,0 +1,11 @@
+## Show that the version for llvm-ar can be printed with either the long flag
+## -version or with the V modifier.
+
+RUN: llvm-ar V | FileCheck %s
+RUN: llvm-ar xV | FileCheck %s
+RUN: llvm-ar -V | FileCheck %s
+RUN: llvm-ar -xV | FileCheck %s
+RUN: llvm-ar -version | FileCheck %s
+RUN: llvm-ar --version | FileCheck %s
+
+CHECK: version
OpenPOWER on IntegriCloud