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