mirror of
https://github.com/boostorg/build.git
synced 2026-01-19 04:02:14 +00:00
The '$' character is now escaped as the "$$" sequence when a non-zero-length "$$" character sequence ends with the "$(" sequence or the '(' character.
This allows the use of SHELL $(...) or $((...)) expressions within bjam expressions such as "actions { ... }" or "[ SHELL ... ]".
---------
Co-authored-by: René Ferdinand Rivera Morell <grafikrobot@gmail.com>
40 lines
796 B
Python
Executable File
40 lines
796 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# Copyright Ivan Kotov 2025.
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# (See accompanying file LICENSE.txt or copy at
|
|
# https://www.bfgroup.xyz/b2/LICENSE.txt)
|
|
|
|
# Regression test. When Jamfile contained "using whatever ; " and the 'whatever'
|
|
# module declared a project, then all targets in Jamfile were considered to be
|
|
# declared in the project associated with 'whatever', not with the Jamfile.
|
|
|
|
import BoostBuild
|
|
|
|
t = BoostBuild.Tester(use_test_config=False)
|
|
|
|
t.write("jamroot.jam", """\
|
|
|
|
rule test {
|
|
value = zero ;
|
|
echo $(value) ;
|
|
echo $$(value) ;
|
|
echo $$$(value) ;
|
|
echo $$$$(value) ;
|
|
echo $$$$ ;
|
|
}
|
|
|
|
test a.test ;
|
|
|
|
""")
|
|
|
|
t.run_build_system(stdout="""zero
|
|
$(value)
|
|
$zero
|
|
$$(value)
|
|
$$$$
|
|
...found 1 target...
|
|
""")
|
|
|
|
t.cleanup()
|