forked from qt-creator/qt-creator
Utils: Support default value substitution in macro expansion
Syntax is similar to bash substitution: %{variable:-default} Change-Id: I50e4e18a186c5408dc8b7b95cebbf891d13e03bf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
eece696da3
commit
3be096f152
@@ -153,6 +153,7 @@ void tst_StringUtils::testMacroExpander_data()
|
||||
{ "%{sl\\/sh/(.)(a)(.)/\\2\\1\\3as}", "salsash" }, // escape in variable name
|
||||
{ "%{JS:foo/b/c}", "%{JS:foo/b/c}" }, // No replacement for JS (all considered varName)
|
||||
{ "%{%{a}%{a}/b/c}", "car" },
|
||||
{ "%{nonsense:-sense}", "sense" },
|
||||
};
|
||||
|
||||
for (unsigned i = 0; i < sizeof(vals)/sizeof(vals[0]); i++)
|
||||
|
Reference in New Issue
Block a user