diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-12 19:34:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-12 19:34:24 +0000 |
commit | 94803598aafdf652da789d79f68e042233d68b99 (patch) | |
tree | 592300f6496d10262e7a22772d5365faaf3185b9 /test/Object/archive-update.test | |
parent | 2a4ac07d21438b37430406a960c0956746f61e7d (diff) | |
download | external_llvm-94803598aafdf652da789d79f68e042233d68b99.zip external_llvm-94803598aafdf652da789d79f68e042233d68b99.tar.gz external_llvm-94803598aafdf652da789d79f68e042233d68b99.tar.bz2 |
Add a test for llvm-ar's u option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/archive-update.test')
-rw-r--r-- | test/Object/archive-update.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Object/archive-update.test b/test/Object/archive-update.test new file mode 100644 index 0000000..761cd1a --- /dev/null +++ b/test/Object/archive-update.test @@ -0,0 +1,25 @@ +Test the 'u' option of llvm-ar + +REQUIRES: shell + +RUN: cd %T +RUN: rm -f %t.a + +Create an achive with the newest file +RUN: llvm-ar r %t.a %p/Inputs/AUX/evenlen +RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s + +Check that without the 'u' option the member is replaced with an older file. +RUN: llvm-ar r %t.a %p/Inputs/evenlen +RUN: llvm-ar p %t.a | FileCheck --check-prefix=OLDER %s + +Check that with the 'u' option the member is replaced with a newer file. +RUN: llvm-ar ru %t.a %p/Inputs/AUX/evenlen +RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s + +Check that with the 'u' option the member is not replaced with an older file. +RUN: llvm-ar ru %t.a %p/Inputs/evenlen +RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s + +NEWER: newer +OLDER: evenlen |