blob: 2ebfe6836be52af6666bd1bed54c936a781c1e2e (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# file : tests/directive/reverse.test
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
# Test reversal to canonical/original representation.
#
.include ../common.test
: name-dir
:
$* <<EOI >>EOO
x = s/foo/bar/
print ([string] $x)
print "$x"
print -e=$x
EOI
s/foo/bar/
s/foo/bar/
-e=s/foo/bar/
EOO
: name-proj
:
$* <<EOI >>EOO
print ([strings] foo%bar foo% %bar)
EOI
foo%bar foo% %bar
EOO
: name-pair
:
$* <<EOI >>EOO
print ([strings] foo@bar foo/@bar/ foo@ @bar @ "@@")
EOI
foo@bar foo/@bar/ foo@ @bar @ @@
EOO
: name-combined
:
$* <<EOI >>EOO
print ([strings] x%foo@y%bar x%foo/@y%bar/)
EOI
x%foo@y%bar x%foo/@y%bar/
EOO
: dir-path
:
r = ([string] $path.canonicalize(foo/bar/));
s = ([string] $path.canonicalize(foo/bar));
$* <<EOI >>"EOO"
x = [dir_path] foo/bar/
print ([string] $x)
print "$x"
print "-I$x"
EOI
$r
$s
-I$s
EOO
: dir-path-root
:
if ($cxx.target.class != windows)
{
$* <<EOI >>EOO
x = [dir_path] /
print ([string] $x)
print "$x"
print "-I$x"
EOI
/
/
-I/
EOO
}
|