Last change
on this file since 2267 was 1981, checked in by bird, 17 years ago |
two more -j sensitive tests found during valgrind run.
|
-
Property svn:eol-style
set to
LF
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.6 KB
|
Line | |
---|
1 | # -*-perl-*-
|
---|
2 | $description = "Test second expansion in ordinary rules.";
|
---|
3 |
|
---|
4 | $details = "";
|
---|
5 |
|
---|
6 | # TEST #0: Test handing of '$' in prerequisites with and without second
|
---|
7 | # expansion.
|
---|
8 | # bird: Modified this test to use ${PRE} instead of $(PRE) as it failes
|
---|
9 | # when make is built with NO_ARCHIVES defined.
|
---|
10 |
|
---|
11 | run_make_test(q!
|
---|
12 | ifdef SE
|
---|
13 | .SECONDEXPANSION:
|
---|
14 | endif
|
---|
15 | foo$$bar: bar$$baz bar$$biz ; @echo '$@ : $^'
|
---|
16 | PRE = one two
|
---|
17 | bar$$baz: $${PRE}
|
---|
18 | baraz: $${PRE}
|
---|
19 | PRE = three four
|
---|
20 | .DEFAULT: ; @echo '$@'
|
---|
21 | !,
|
---|
22 | '',
|
---|
23 | "\${PRE}\nbar\$biz\nfoo\$bar : bar\$baz bar\$biz");
|
---|
24 |
|
---|
25 | run_make_test(undef, 'SE=1', "three\nfour\nbariz\nfoo\$bar : baraz bariz");
|
---|
26 |
|
---|
27 | # TEST #1: automatic variables.
|
---|
28 | #
|
---|
29 | run_make_test('
|
---|
30 | .SECONDEXPANSION:
|
---|
31 | .DEFAULT: ; @echo $@
|
---|
32 |
|
---|
33 | foo: bar baz
|
---|
34 |
|
---|
35 | foo: biz | buz
|
---|
36 |
|
---|
37 | foo: [email protected] \
|
---|
38 | $$<.2 \
|
---|
39 | $$(addsuffix .3,$$^) \
|
---|
40 | $$(addsuffix .4,$$+) \
|
---|
41 | $$|.5 \
|
---|
42 | $$*.6
|
---|
43 |
|
---|
44 | ',
|
---|
45 | '-j1',
|
---|
46 | 'bar
|
---|
47 | baz
|
---|
48 | biz
|
---|
49 | buz
|
---|
50 | foo.1
|
---|
51 | bar.2
|
---|
52 | bar.3
|
---|
53 | baz.3
|
---|
54 | biz.3
|
---|
55 | bar.4
|
---|
56 | baz.4
|
---|
57 | biz.4
|
---|
58 | buz.5
|
---|
59 | .6
|
---|
60 | ');
|
---|
61 |
|
---|
62 |
|
---|
63 | # Test #2: target/pattern -specific variables.
|
---|
64 | #
|
---|
65 | run_make_test('
|
---|
66 | .SECONDEXPANSION:
|
---|
67 | .DEFAULT: ; @echo $@
|
---|
68 |
|
---|
69 | foo.x: $$a $$b
|
---|
70 |
|
---|
71 | foo.x: a := bar
|
---|
72 |
|
---|
73 | %.x: b := baz
|
---|
74 |
|
---|
75 | ',
|
---|
76 | '',
|
---|
77 | 'bar
|
---|
78 | baz
|
---|
79 | ');
|
---|
80 |
|
---|
81 |
|
---|
82 | # Test #3: order of prerequisites.
|
---|
83 | #
|
---|
84 | run_make_test('
|
---|
85 | .SECONDEXPANSION:
|
---|
86 | .DEFAULT: ; @echo $@
|
---|
87 |
|
---|
88 | all: foo bar baz
|
---|
89 |
|
---|
90 | # Subtest #1
|
---|
91 | #
|
---|
92 | foo: foo.1; @:
|
---|
93 |
|
---|
94 | foo: foo.2
|
---|
95 |
|
---|
96 | foo: foo.3
|
---|
97 |
|
---|
98 |
|
---|
99 | # Subtest #2
|
---|
100 | #
|
---|
101 | bar: bar.2
|
---|
102 |
|
---|
103 | bar: bar.1; @:
|
---|
104 |
|
---|
105 | bar: bar.3
|
---|
106 |
|
---|
107 |
|
---|
108 | # Subtest #3
|
---|
109 | #
|
---|
110 | baz: baz.1
|
---|
111 |
|
---|
112 | baz: baz.2
|
---|
113 |
|
---|
114 | baz: ; @:
|
---|
115 |
|
---|
116 | ',
|
---|
117 | '-j1',
|
---|
118 | 'foo.1
|
---|
119 | foo.2
|
---|
120 | foo.3
|
---|
121 | bar.1
|
---|
122 | bar.2
|
---|
123 | bar.3
|
---|
124 | baz.1
|
---|
125 | baz.2
|
---|
126 | ');
|
---|
127 |
|
---|
128 | # This tells the test driver that the perl test script executed properly.
|
---|
129 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.