]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/python |
2 | ||
3 | # Copyright Vladimir Prus 2005. | |
4 | # Distributed under the Boost Software License, Version 1.0. | |
1e59de90 TL |
5 | # (See accompanying file LICENSE.txt or copy at |
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt) | |
7c673cae FG |
7 | |
8 | # Regression test. When Jamfile contained "using whatever ; " and the 'whatever' | |
9 | # module declared a project, then all targets in Jamfile were considered to be | |
10 | # declared in the project associated with 'whatever', not with the Jamfile. | |
11 | ||
12 | import BoostBuild | |
13 | ||
14 | t = BoostBuild.Tester(use_test_config=False) | |
15 | ||
16 | t.write("a.cpp", "int main() {}\n") | |
17 | ||
18 | t.write("jamroot.jam", """\ | |
19 | using some_tool ; | |
20 | exe a : a.cpp ; | |
21 | """) | |
22 | ||
23 | t.write("some_tool.jam", """\ | |
24 | import project ; | |
25 | project.initialize $(__name__) ; | |
26 | rule init ( ) { } | |
27 | """) | |
28 | ||
29 | t.write("some_tool.py", """\ | |
30 | from b2.manager import get_manager | |
31 | get_manager().projects().initialize(__name__) | |
32 | def init(): | |
33 | pass | |
34 | """) | |
35 | ||
36 | t.run_build_system() | |
b32b8144 | 37 | t.expect_addition("bin/$toolset/debug*/a.exe") |
7c673cae FG |
38 | |
39 | t.cleanup() |