build/test/conditionals3.py
Steven Watanabe 0d5e76ebf2 Upgrade the scanner to handle whitespace more intelligently
* The new scanner is currently disabled and only issues a warning
  for tokens that would be lexed differently.
* Special case a few common uses of ':', to limit breakage to
  a manageable level.
* Remove the horribly outdated Jambase code inherited from Perforce Jam
* Update all of Boost.Build to work in the presence of the new lexer.
2018-01-31 14:08:36 -07:00

31 lines
707 B
Python

#!/usr/bin/python
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Test that conditional properties work, even if property is free, and value
# includes a colon.
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
t.write("jamroot.jam", """
exe hello : hello.cpp : <variant>debug:<define>"CLASS=Foo::Bar" ;
""")
t.write("hello.cpp", """
namespace Foo { class Bar { } ; }
int main()
{
CLASS c;
c; // Disables the unused variable warning.
}
""")
t.run_build_system(stdout=None, stderr=None)
t.expect_addition("bin/$toolset/debug*/hello.exe")
t.cleanup()