Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/inline.py @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
4#  distribute this software is granted provided this copyright notice appears in
5#  all copies. This software is provided "as is" without express or implied
6#  warranty, and with no claim as to its suitability for any purpose.
7
8from BoostBuild import Tester, List
9
10t = Tester()
11
12t.write("project-root.jam", "")
13t.write("Jamfile", """
14alias everything : [ exe a : a.cpp ] ;
15""")
16
17t.write("a.cpp", """
18int main()
19{
20    return 0;
21}
22
23""")
24
25t.run_build_system()
26t.expect_addition("bin/$toolset/debug/everything..a.exe")
27t.rm("bin/$toolset/debug/everything..a.exe")
28
29t.run_build_system("everything..a")
30t.expect_addition("bin/$toolset/debug/everything..a.exe")
31
32t.rm("bin")
33
34# Now check that inline targets with the same name but
35# present in different places are not confused between
36# each other, and with top-level targets.
37t.write("Jamfile", """
38exe a : a.cpp ;
39alias everything : [ exe a : a.cpp ] ;
40alias everything2 : [ exe a : a.cpp ] ;
41""")
42
43t.run_build_system()
44t.expect_addition("bin/$toolset/debug/a.exe")
45t.expect_addition("bin/$toolset/debug/everything..a.exe")
46t.expect_addition("bin/$toolset/debug/everything2..a.exe")
47
48
49t.cleanup()
50
Note: See TracBrowser for help on using the repository browser.