Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/suffix.py @ 32

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

updated boost from 1_33_1 to 1_34_1

File size: 1.2 KB
Line 
1#!/usr/bin/python
2
3# Copyright 2003, 2004 Vladimir Prus
4# Distributed under the Boost Software License, Version 1.0.
5# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7from BoostBuild import Tester, List
8
9t = Tester()
10
11#  Regression test: when staging V2 used to change suffixes on targets
12#  corresponding to real files.
13t.write("Jamfile", """
14import type : register ;
15register A : a1 a2 a3 ;
16
17stage a : a.a3 ;
18""")
19
20t.write("project-root.jam", "")
21t.write("a.a3", "")
22
23t.run_build_system()
24t.expect_addition("a/a.a3");
25
26# Regression test: we should be able to specify empty suffix for
27# derived target type, even if base type has non-empty suffix.
28t.write("a.cpp", "")
29
30t.write("suffixes.jam", """
31import type ;
32import generators ;
33import common ;
34
35type.register First : first : ;
36type.register Second : "" : First ;
37
38generators.register-standard $(__name__).second : CPP : Second ;
39
40rule second
41{
42    TOUCH on $(<) = [ common.file-creation-command ] ;
43}
44
45actions second
46{
47    $(TOUCH) $(<)
48}
49
50""")
51
52t.write("project-root.jam", """
53import suffixes ;
54""")
55
56t.write("Jamfile", """
57second a : a.cpp ;
58""")
59
60t.run_build_system()
61t.expect_addition("bin/$toolset/debug/a")
62
63
64t.cleanup()
Note: See TracBrowser for help on using the repository browser.