aboutsummaryrefslogtreecommitdiff
path: root/tests/variable/target-type-pattern-specific/testscript
blob: 1a3e98a559e3b901fdb59b2a853b1482ec67e4d4 (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
# file      : tests/variable/target-type-pattern-specific/testscript
# 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