An llvm-ar test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18043 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Archive/extract_GNU.ll b/test/Archive/extract_GNU.ll
new file mode 100644
index 0000000..486dd86
--- /dev/null
+++ b/test/Archive/extract_GNU.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from GNU style archives
+;RUN: llvm-ar x %p/GNU.a very_long_bytecode_file_name.bc
+;RUN: diff -q %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc
diff --git a/test/Archive/extract_MacOSX.ll b/test/Archive/extract_MacOSX.ll
new file mode 100644
index 0000000..e835f40
--- /dev/null
+++ b/test/Archive/extract_MacOSX.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from MacOSX style archives
+
+;RUN: llvm-ar x %p/MacOSX.a very_long_bytecode_file_name.bc
+;RUN: diff -q %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc
diff --git a/test/Archive/extract_SVR4.ll b/test/Archive/extract_SVR4.ll
new file mode 100644
index 0000000..9fa8ced
--- /dev/null
+++ b/test/Archive/extract_SVR4.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from SVR4 style archives
+
+;RUN: llvm-ar x %p/SVR4.a very_long_bytecode_file_name.bc
+;RUN: diff -q %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc
diff --git a/test/Archive/extract_xpg4.ll b/test/Archive/extract_xpg4.ll
new file mode 100644
index 0000000..72a5b90
--- /dev/null
+++ b/test/Archive/extract_xpg4.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from xpg4 style archives
+
+;RUN: llvm-ar x %p/xpg4.a very_long_bytecode_file_name.bc
+;RUN: diff -q %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc
diff --git a/test/Archive/ranlib_GNU.ll b/test/Archive/ranlib_GNU.ll
new file mode 100644
index 0000000..c735b37
--- /dev/null
+++ b/test/Archive/ranlib_GNU.ll
@@ -0,0 +1,12 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a symbol table for
+;GNU style archives
+;RUN: cp %p/GNU.a . 
+;RUN: llvm-ranlib GNU.a
+;RUN: llvm-ar t GNU.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/ranlib_MacOSX.ll b/test/Archive/ranlib_MacOSX.ll
new file mode 100644
index 0000000..bf42aad
--- /dev/null
+++ b/test/Archive/ranlib_MacOSX.ll
Binary files differ
diff --git a/test/Archive/ranlib_SVR4.ll b/test/Archive/ranlib_SVR4.ll
new file mode 100644
index 0000000..4eeb7bd
--- /dev/null
+++ b/test/Archive/ranlib_SVR4.ll
@@ -0,0 +1,12 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a symbol table for
+;SVR4 style archives
+;RUN: cp %p/SVR4.a . 
+;RUN: llvm-ranlib SVR4.a
+;RUN: llvm-ar t SVR4.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/ranlib_xpg4.ll b/test/Archive/ranlib_xpg4.ll
new file mode 100644
index 0000000..6388cc2
--- /dev/null
+++ b/test/Archive/ranlib_xpg4.ll
@@ -0,0 +1,12 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a symbol table for
+;xpg4 style archives
+;RUN: cp %p/xpg4.a . 
+;RUN: llvm-ranlib xpg4.a
+;RUN: llvm-ar t xpg4.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/toc_GNU.ll b/test/Archive/toc_GNU.ll
new file mode 100644
index 0000000..f159563
--- /dev/null
+++ b/test/Archive/toc_GNU.ll
@@ -0,0 +1,10 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;GNU style archives
+;RUN: llvm-ar t %p/GNU.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/toc_MacOSX.ll b/test/Archive/toc_MacOSX.ll
new file mode 100644
index 0000000..efc2224
--- /dev/null
+++ b/test/Archive/toc_MacOSX.ll
Binary files differ
diff --git a/test/Archive/toc_SVR4.ll b/test/Archive/toc_SVR4.ll
new file mode 100644
index 0000000..589d34c
--- /dev/null
+++ b/test/Archive/toc_SVR4.ll
@@ -0,0 +1,10 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;SVR4 style archives
+;RUN: llvm-ar t %p/SVR4.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/toc_xpg4.ll b/test/Archive/toc_xpg4.ll
new file mode 100644
index 0000000..1415421
--- /dev/null
+++ b/test/Archive/toc_xpg4.ll
@@ -0,0 +1,10 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;xpg4 style archives
+;RUN: llvm-ar t %p/xpg4.a > %t1
+;RUN: sed -e '/^;.*/d' %s >%t2
+;RUN: diff %t2 %t1
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o