2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-01 20:32:17 +00:00
Files
build/test/print.py
Douglas Gregor 51fc0e2dee print.py: Test the print module by using it to output text with quotes to a
text file

test_all.py: add print.py


[SVN r18126]
2003-03-28 15:27:14 +00:00

46 lines
740 B
Python

#!/usr/bin/python
from BoostBuild import Tester, List
t = Tester()
t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", """
import print ;
print.output foo ;
print.text \\\"Something\\\" ;
DEPENDS all : foo ;
ALWAYS foo ;
""")
t.run_build_system()
t.expect_content("foo", """\"Something\"
""")
t.write("Jamfile", """
import print ;
print.output foo ;
print.text \\\"Somethingelse\\\" ;
DEPENDS all : foo ;
ALWAYS foo ;
""")
t.run_build_system()
t.expect_content("foo", """\"Something\"
\"Somethingelse\"
""")
t.write("Jamfile", """
import print ;
print.output foo ;
print.text \\\"Different\\\" : true ;
DEPENDS all : foo ;
ALWAYS foo ;
""")
t.run_build_system()
t.expect_content("foo", """\"Different\"
""")
t.cleanup()