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
|
#!/usr/bin/python
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
from BoostBuild import Tester, List
t = Tester(pass_toolset=0)
# Test that
t.write("code", """
module a {
rule r1 ( )
{
ECHO R1 ;
}
}
module a2 {
rule r2 ( )
{
ECHO R2 ;
}
}
IMPORT a2 : r2 : : a2.r2 ;
module b {
IMPORT_MODULE a : b ;
rule test
{
# Call rule visible via IMPORT_MODULE
a.r1 ;
# Call rule in global scope
a2.r2 ;
}
}
IMPORT b : test : : test ;
test ;
module c {
rule test
{
ECHO CTEST ;
}
}
IMPORT_MODULE c : ;
c.test ;
actions do-nothing { }
do-nothing all ;
""")
t.run_build_system("-fcode", stdout="""R1
R2
CTEST
""")
t.cleanup()
|