2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-02 08:42:13 +00:00
Files
build/test/core_varnames.py
Dave Abrahams 1e2b34c928 tests for new builtin rules
[SVN r18409]
2003-05-15 22:27:47 +00:00

34 lines
586 B
Python

#!/usr/bin/python
# This tests the core rule for enumerating the variable names in a module
import BoostBuild
t = BoostBuild.Tester(pass_toolset=0)
t.write("file.jam", """
module foo
{
rule bar { }
var1 = x y ;
var2 = fubar ;
}
expected = var1 var2 ;
names = [ VARNAMES foo ] ;
if $(names) in $(expected) && $(expected) in $(names)
{
# everything OK
}
else
{
EXIT expected to find variables $(expected:J=", ") in module foo,
but found $(names:J=", ") instead. ;
}
DEPENDS all : xx ;
NOTFILE xx ;
""")
t.run_build_system("-ffile.jam", status=0)
t.cleanup()