[PATCH] D73333: [llvm-ar][test] Add to llvm-ar test coverage

Owen Reynolds via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 03:27:02 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e0f9d5d3c6b: [llvm-ar][test] Add to llvm-ar test coverage (authored by gbreynoo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73333/new/

https://reviews.llvm.org/D73333

Files:
  llvm/test/tools/llvm-ar/double-hyphen.test
  llvm/test/tools/llvm-ar/response.test
  llvm/test/tools/llvm-ar/symtab.test


Index: llvm/test/tools/llvm-ar/symtab.test
===================================================================
--- llvm/test/tools/llvm-ar/symtab.test
+++ llvm/test/tools/llvm-ar/symtab.test
@@ -52,6 +52,12 @@
 # RUN: llvm-nm --print-armap %t-to-no-symtab.a \
 # RUN:   | FileCheck %s --check-prefix=NO-SYMTAB
 
+## Thin Archive:
+# RUN: rm -f %t-thin.a
+# RUN: llvm-ar rcT %t-thin.a %t.o
+# RUN: llvm-nm --print-armap %t-thin.a \
+# RUN:   | FileCheck %s --check-prefix=SYMTAB
+
 # SYMTAB:        symbol in
 # NO-SYMTAB-NOT: symbol in
 
Index: llvm/test/tools/llvm-ar/response.test
===================================================================
--- llvm/test/tools/llvm-ar/response.test
+++ llvm/test/tools/llvm-ar/response.test
@@ -17,6 +17,13 @@
 # RUN: llvm-ar @%t.response3.txt %t.txt
 # RUN: llvm-ar p %t3.a | FileCheck %s --check-prefix=CONTENTS
 
+## Newlines
+# RUN: echo contents > %t.txt
+# RUN: echo rc %t4.a > %t.newline.txt
+# RUN: echo %t.txt >> %t.newline.txt
+# RUN: llvm-ar @%t.newline.txt
+# RUN: llvm-ar p %t4.a | FileCheck %s --check-prefix=CONTENTS
+
 # CONTENTS: contents
 
 ## rsp-quoting
Index: llvm/test/tools/llvm-ar/double-hyphen.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-ar/double-hyphen.test
@@ -0,0 +1,9 @@
+## Test the use of "--" on the commandline
+
+# RUN: echo contents > %t.txt
+
+# RUN: rm -f %t.ar
+# RUN: llvm-ar rc -- %t.ar %t.txt 2>&1 | count 0
+
+# RUN: llvm-ar p %t.ar | FileCheck %s
+# CHECK: contents


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73333.248138.patch
Type: text/x-patch
Size: 1522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/bf83e1e5/attachment.bin>


More information about the llvm-commits mailing list