Imported Upstream version 1.51.0
[platform/upstream/boost.git] / tools / build / test / print.py
1 #!/usr/bin/python
2
3 # Copyright 2003 Douglas Gregor 
4 # Copyright 2005 Vladimir Prus 
5 # Distributed under the Boost Software License, Version 1.0. 
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
7
8 import BoostBuild
9
10 t = BoostBuild.Tester()
11
12 t.write("jamroot.jam", "import gcc ;")
13
14 t.write("jamfile.jam", """
15 import print ;
16 print.output foo ;
17 print.text \\\"Something\\\" ;
18 DEPENDS all : foo ;
19 ALWAYS foo ;
20 """)
21
22 t.run_build_system()
23 t.expect_content("foo", """\"Something\"""")
24
25 t.write("jamfile.jam", """
26 import print ;
27 print.output foo ;
28 print.text \\\n\\\"Somethingelse\\\" ;
29 DEPENDS all : foo ;
30 ALWAYS foo ;
31 """)
32
33 t.run_build_system()
34 t.expect_content("foo", """\"Something\"
35 \"Somethingelse\"""")
36
37 t.write("jamfile.jam", """
38 import print ;
39 print.output foo ;
40 print.text \\\"Different\\\" : true ;
41 DEPENDS all : foo ;
42 ALWAYS foo ;
43 """)
44
45 t.run_build_system()
46 t.expect_content("foo", """\"Different\"""")
47
48 t.cleanup()