blob: e60dbe160427908ab80c60f9ba78e249bb88e5be (
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
|
# file : tests/variable/target-type-pattern-specific/testscript
# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
# NOTE: see also old tests.
.include ../../common.testscript
: basic
:
$* <<EOI >>EOO
x = x
y = y
dir{*}: x = X
dir{*}: y += Y
print $(./: x)
print $(./: y)
EOI
X
y Y
EOO
: block
:
$* <<EOI >>EOO
x = x
y = y
dir{*}:
{
x = X
y += Y
z = $x # Note: from scope.
}
print $(./: x)
print $(./: y)
print $(./: z)
EOI
X
y Y
x
EOO
: block-multiple
:
$* <<EOI >>EOO
x = x
y = y
file{f*} file{b*}:
{
x = X
y += Y
}
print $(file{foo}: x)
print $(file{bar}: y)
EOI
X
y Y
EOO
|