2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-02 20:52:13 +00:00
Files
build/test/make_rule.py
Vladimir Prus 10837cd3f5 More testing improvements.
* new/build-system.jam: Try to load 'test-config.jam'. If successfull,
    don't load site-config.jam/user-config.jam.

* test/BoostBuild.py: Add directory where test is invoked to BOOST_BUILD_PATH,
    so that test-config.jam can be dropped to "test" dir.


[SVN r17558]
2003-02-20 15:58:02 +00:00

33 lines
558 B
Python

#!/usr/bin/python
# Test the 'make' rule
from BoostBuild import Tester
from string import find
t = Tester(pass_toolset=0)
t.write("project-root.jam", "")
t.write("Jamfile", """
rule creator ( string targets * : sources * : * )
{
STRING on $(targets) = $(string) ;
creator2 $(targets) : $(sources) ;
}
actions creator2
{
echo $(STRING) > $(<)
}
make foo.bar : : creator foobar ;
""")
t.run_build_system()
t.expect_addition("bin/$toolset/debug/foo.bar")
t.fail_test(find(t.read("bin/$toolset/debug/foo.bar"), "foobar") == -1)
t.cleanup()