2
0
mirror of https://github.com/boostorg/build.git synced 2026-01-31 20:12:19 +00:00
Files
build/test/core_delete_module.py
Dave Abrahams 1e2b34c928 tests for new builtin rules
[SVN r18409]
2003-05-15 22:27:47 +00:00

48 lines
818 B
Python

#!/usr/bin/python
# This tests the facilities for deleting modules.
import BoostBuild
t = BoostBuild.Tester(pass_toolset=0)
t.write("file.jam", """
module foo
{
rule bar { }
var = x y ;
}
DELETE_MODULE foo ;
if [ RULENAMES foo ]
{
EXIT DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ;
}
module foo
{
if $(var)
{
EXIT DELETE_MODULE failed to kill foo's variables ;
}
rule bar { }
var = x y ;
DELETE_MODULE foo ;
if $(var)
{
EXIT internal DELETE_MODULE failed to kill foo's variables ;
}
if [ RULENAMES foo ]
{
EXIT internal DELETE_MODULE failed to kill foo's rules: [ RULENAMES foo ] ;
}
}
DEPENDS all : xx ;
NOTFILE xx ;
""")
t.run_build_system("-ffile.jam", status=0)
t.cleanup()