]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/core_variables_in_actions.py
3 # Copyright 2012. Jurko Gospodnetic
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
8 # Tests that variables in actions get expanded but double quote characters
9 # get treated as regular characters and not string literal delimiters when
10 # determining string tokens concatenated to the variable being expanded.
12 # We also take care to make this test work correctly when run using both
13 # Windows and Unix echo command variant. That is why we add the extra single
14 # quotes around the text being echoed - they will make the double quotes be
15 # displayed as regular characters in both cases but will be displayed
16 # themselves only when using the Windows cmd shell's echo command.
20 t
= BoostBuild
.Tester(pass_toolset
=0)
21 t
.write("file.jam", """\
25 ECHO From rule: $(a)" seconds" ;
31 echo 'From action: $(a)" seconds"'
36 t
.run_build_system(["-ffile.jam", "-d1"])
37 t
.expect_output_lines("From rule: 1 seconds 2 seconds 3 seconds")
38 t
.expect_output_lines('*From action: 1" 2" 3" seconds"*')