1#!/usr/local/bin/python3.8
2
3# Copyright 2003 Vladimir Prus
4# Distributed under the Boost Software License, Version 1.0.
5# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7# Test that conditional properties work, even if property is free, and value
8# includes a colon.
9
10import BoostBuild
11
12t = BoostBuild.Tester(use_test_config=False)
13
14t.write("jamroot.jam", """
15exe hello : hello.cpp : <variant>debug:<define>"CLASS=Foo::Bar" ;
16""")
17
18t.write("hello.cpp", """
19namespace Foo { class Bar { } ; }
20int main()
21{
22    CLASS c;
23    c;  // Disables the unused variable warning.
24}
25""")
26
27t.run_build_system(stdout=None, stderr=None)
28t.expect_addition("bin/$toolset/debug*/hello.exe")
29
30t.cleanup()
31