Rafael Espindola | 9cef215 | 2013-07-12 19:34:24 +0000 | [diff] [blame^] | 1 | Test the 'u' option of llvm-ar |
| 2 | |
| 3 | REQUIRES: shell |
| 4 | |
| 5 | RUN: cd %T |
| 6 | RUN: rm -f %t.a |
| 7 | |
| 8 | Create an achive with the newest file |
| 9 | RUN: llvm-ar r %t.a %p/Inputs/AUX/evenlen |
| 10 | RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s |
| 11 | |
| 12 | Check that without the 'u' option the member is replaced with an older file. |
| 13 | RUN: llvm-ar r %t.a %p/Inputs/evenlen |
| 14 | RUN: llvm-ar p %t.a | FileCheck --check-prefix=OLDER %s |
| 15 | |
| 16 | Check that with the 'u' option the member is replaced with a newer file. |
| 17 | RUN: llvm-ar ru %t.a %p/Inputs/AUX/evenlen |
| 18 | RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s |
| 19 | |
| 20 | Check that with the 'u' option the member is not replaced with an older file. |
| 21 | RUN: llvm-ar ru %t.a %p/Inputs/evenlen |
| 22 | RUN: llvm-ar p %t.a | FileCheck --check-prefix=NEWER %s |
| 23 | |
| 24 | NEWER: newer |
| 25 | OLDER: evenlen |