1 ## Test that read-only archives cannot be edited
3 # RUN: rm -rf %t && mkdir -p %t
8 # RUN: llvm-ar rc %t/archive.a %t/1.txt %t/2.txt
11 # RUN: chmod 444 %t/archive.a
13 # RUN: not llvm-ar r %t/archive.a %t/3.txt \
14 # RUN: FileCheck %s --check-prefix=ERROR -DFILE=%t/archive.a
16 # ERROR: error: [[FILE]]: no such file or directory.
18 # RUN: not llvm-ar q %t/archive.a %t/3.txt \
19 # RUN: FileCheck %s --check-prefix=ERROR -DFILE=%t/archive.a
21 # RUN: not llvm-ar m %t/archive.a t/1.txt \
22 # RUN: FileCheck %s --check-prefix=ERROR-2 -DFILE=%t/archive.a
24 # ERROR-2: error: [[FILE]]: permission denied.
26 # RUN: llvm-ar t %t/archive.a \
27 # RUN: | FileCheck %s --check-prefix=ARCHIVE --match-full-lines --implicit-check-not {{.}}