1 # Test that windows path separators are handled correctly.
2 REQUIRES: system-windows
4 # Note: many of these tests depend on relative paths, so we have to cd to a
5 # test directory first.
6 RUN: mkdir -p %t && cd %t
7 RUN: rm -rf a b && mkdir a b
8 RUN: echo hello-a > a/foo.txt
9 RUN: echo hello-b > b/foo.txt
10 RUN: echo hello-parent > foo.txt
12 # P is implied when using thin archives.
15 RUN: llvm-ar rcST archive.a a\..\a\foo.txt
16 RUN: llvm-ar rcST archive.a foo.txt
17 RUN: llvm-ar rcST archive.a b\foo.txt b/foo.txt
18 RUN: llvm-ar dT archive.a foo.txt
19 RUN: llvm-ar t archive.a | FileCheck %s --check-prefix=ARCHIVE --implicit-check-not {{.}}
22 ARCHIVE-NEXT: b/foo.txt
23 ARCHIVE-NEXT: b/foo.txt
25 RUN: llvm-ar t archive.a | FileCheck %s --check-prefix=LIST-BOTH --implicit-check-not {{.}}
26 RUN: llvm-ar t archive.a a\foo.txt | FileCheck %s --check-prefix=LIST-A --implicit-check-not {{.}}
27 RUN: llvm-ar t archive.a b\foo.txt | FileCheck %s --check-prefix=LIST-B --implicit-check-not {{.}}
30 LIST-BOTH-NEXT: b/foo.txt
31 LIST-BOTH-NEXT: b/foo.txt
35 # Nesting a thin archive with a name conflict.
36 RUN: rm -f a\nested.a b\nested.a nested.a
37 RUN: llvm-ar rcST a\nested.a a\foo.txt
38 RUN: llvm-ar rcST b\nested.a b\foo.txt
39 RUN: llvm-ar rcST nested.a a\nested.a foo.txt b\nested.a
40 RUN: llvm-ar t nested.a | FileCheck %s --check-prefix=NESTED --implicit-check-not {{.}}
44 NESTED-NEXT: b/foo.txt