File: windows-path.test

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (44 lines) | stat: -rw-r--r-- 1,559 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Test that windows path seperators are handled correctly.
REQUIRES: system-windows

# Note: many of these tests depend on relative paths, so we have to cd to a
# test directory first.
RUN: mkdir -p %t && cd %t
RUN: rm -rf a b && mkdir a b
RUN: echo hello-a      > a/foo.txt
RUN: echo hello-b      > b/foo.txt
RUN: echo hello-parent > foo.txt

# P is implied when using thin archives.
# Create an archive.
RUN: rm -f archive.a
RUN: llvm-ar rcST archive.a a\..\a\foo.txt
RUN: llvm-ar rcST archive.a foo.txt
RUN: llvm-ar rcST archive.a b\foo.txt b/foo.txt
RUN: llvm-ar dT archive.a foo.txt
RUN: llvm-ar t archive.a | FileCheck %s --check-prefix=ARCHIVE --implicit-check-not {{.}}

ARCHIVE:      a/foo.txt
ARCHIVE-NEXT: b/foo.txt
ARCHIVE-NEXT: b/foo.txt

RUN: llvm-ar t archive.a | FileCheck %s --check-prefix=LIST-BOTH --implicit-check-not {{.}}
RUN: llvm-ar t archive.a a\foo.txt | FileCheck %s --check-prefix=LIST-A --implicit-check-not {{.}}
RUN: llvm-ar t archive.a b\foo.txt | FileCheck %s --check-prefix=LIST-B --implicit-check-not {{.}}

LIST-BOTH:       a/foo.txt
LIST-BOTH-NEXT:  b/foo.txt
LIST-BOTH-NEXT:  b/foo.txt
LIST-A:          a/foo.txt
LIST-B:          b/foo.txt

# Nesting a thin archive with a name conflict.
RUN: rm -f a\nested.a b\nested.a nested.a
RUN: llvm-ar rcST a\nested.a a\foo.txt
RUN: llvm-ar rcST b\nested.a b\foo.txt
RUN: llvm-ar rcST nested.a a\nested.a foo.txt b\nested.a
RUN: llvm-ar t nested.a | FileCheck %s --check-prefix=NESTED --implicit-check-not {{.}}

NESTED:      a/foo.txt
NESTED-NEXT: foo.txt
NESTED-NEXT: b/foo.txt