1 ## Test the CREATE MRI command.
3 # RUN: rm -rf %t && mkdir -p %t/path/ && split-file %s %t
6 # RUN: llvm-ar -M < create.mri
7 # RUN: llvm-ar -M < thin.mri
9 ## Test use of CREATE with no archive name.
10 # RUN: not llvm-ar -M < none.mri 2>&1 | FileCheck --check-prefix=NONE %s
11 # RUN: not llvm-ar -M < thin-none.mri 2>&1 | FileCheck --check-prefix=NONE %s
12 # RUN: not llvm-ar -M < none-add.mri 2>&1 | FileCheck --check-prefix=NONE %s
13 # RUN: not llvm-ar -M < thin-none-add.mri 2>&1 | FileCheck --check-prefix=NONE %s
15 # NONE: error: script line 1: missing archive name
17 ## Test use of paths with CREATE.
18 # RUN: llvm-ar -M < path.mri
20 # RUN: llvm-ar -M < thin-path.mri
21 # RUN: ls path/thin-path.a
23 ## Test bad paths with CREATE.
24 # RUN: not llvm-ar -M < bad.mri 2>&1 | FileCheck --check-prefix=BAD -DMSG=%errc_ENOENT %s
25 # RUN: not llvm-ar -M < thin-bad.mri 2>&1 | FileCheck --check-prefix=BAD -DMSG=%errc_ENOENT %s
26 # BAD: error: bad/bad.a: [[MSG]]
28 ## Test duplicate use of CREATE.
29 # RUN: not llvm-ar -M < create2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
30 # RUN: not llvm-ar -M < thin2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
31 # RUN: not llvm-ar -M < mix1.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
32 # RUN: not llvm-ar -M < mix2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
33 # RUN: not llvm-ar -M < save.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=3
34 # RUN: not llvm-ar -M < thin-save.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=3
36 # MULTIPLE: error: script line [[LINE]]: editing multiple archives not supported
62 #--- thin-none-add.mri
72 CREATETHIN path/thin-path.a