summaryrefslogtreecommitdiff
path: root/tools/build/test/conditionals3.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/test/conditionals3.py')
-rw-r--r--tools/build/test/conditionals3.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/build/test/conditionals3.py b/tools/build/test/conditionals3.py
new file mode 100644
index 000000000..028fad621
--- /dev/null
+++ b/tools/build/test/conditionals3.py
@@ -0,0 +1,30 @@
+#!/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()