summaryrefslogtreecommitdiff
path: root/test/Object
diff options
context:
space:
mode:
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/ar-create.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Object/ar-create.test b/test/Object/ar-create.test
new file mode 100644
index 0000000000..40e391da02
--- /dev/null
+++ b/test/Object/ar-create.test
@@ -0,0 +1,17 @@
+Test which operations create an archive and which don't.
+
+RUN: touch %t
+RUN: rm -f %t.foo.a
+RUN: not llvm-ar p %t.foo.a %t 2>&1 | FileCheck %s
+RUN: not llvm-ar d %t.foo.a %t 2>&1 | FileCheck %s
+RUN: not llvm-ar m %t.foo.a %t 2>&1 | FileCheck %s
+RUN: not llvm-ar t %t.foo.a %t 2>&1 | FileCheck %s
+RUN: not llvm-ar x %t.foo.a %t 2>&1 | FileCheck %s
+
+RUN: llvm-ar q %t.foo.a %t 2>&1 | FileCheck --check-prefix=CREATE %s
+RUN: rm -f %t.foo.a
+RUN: llvm-ar r %t.foo.a %t 2>&1 | FileCheck --check-prefix=CREATE %s
+RUN: rm -f %t.foo.a
+
+CHECK: .foo.a': No such file or directory
+CREATE: creating {{.*}}.foo.a