CMake: pro2cmake.py: Make \$\$QT_FOO work in assignments
This broke somewhere along the way. Add a test for this. Change-Id: I106ddff6eb86a51ef132285d1bc623f3b5cf71fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
754ba28799
commit
33fe56c630
@ -544,7 +544,7 @@ class QmakeParser:
|
||||
SubstitutionValue \
|
||||
= pp.Combine(pp.OneOrMore(Substitution | LiteralValuePart
|
||||
| pp.Literal('$')))
|
||||
Value = pp.NotAny(Else | pp.Literal('}') | EOL | pp.Literal('\\')) \
|
||||
Value = pp.NotAny(Else | pp.Literal('}') | EOL) \
|
||||
+ (pp.QuotedString(quoteChar='"', escChar='\\')
|
||||
| SubstitutionValue
|
||||
| BracedValue)
|
||||
|
2
util/cmake/tests/data/escaped_value.pro
Normal file
2
util/cmake/tests/data/escaped_value.pro
Normal file
@ -0,0 +1,2 @@
|
||||
MODULE_AUX_INCLUDES = \
|
||||
\$\$QT_MODULE_INCLUDE_BASE/QtANGLE
|
@ -287,3 +287,10 @@ def test_realworld_sql():
|
||||
assert len(result) == 2
|
||||
validate_op('TEMPLATE', '=', ['subdirs'], result[0])
|
||||
validate_op('SUBDIRS', '=', ['kernel'], result[1])
|
||||
|
||||
|
||||
def test_realworld_qtconfig():
|
||||
result = parse_file(_tests_path + '/data/escaped_value.pro')
|
||||
assert len(result) == 1
|
||||
validate_op('MODULE_AUX_INCLUDES', '=', ['\\$\\$QT_MODULE_INCLUDE_BASE/QtANGLE'], result[0])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user