diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-07-03 22:02:05 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-07-18 13:15:58 +0000 |
commit | 3be096f1524ee8009400053823e4332fedb1df0c (patch) | |
tree | bec03d7a8b0da3a92560af764d31f78a2905c69f /tests/auto/utils/stringutils/tst_stringutils.cpp | |
parent | eece696da383bdcd55e7d3d8a51b5226b3d3419f (diff) | |
download | qt-creator-3be096f1524ee8009400053823e4332fedb1df0c.tar.gz |
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>
Diffstat (limited to 'tests/auto/utils/stringutils/tst_stringutils.cpp')
-rw-r--r-- | tests/auto/utils/stringutils/tst_stringutils.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/utils/stringutils/tst_stringutils.cpp b/tests/auto/utils/stringutils/tst_stringutils.cpp index 972d0b35d5..051baf3470 100644 --- a/tests/auto/utils/stringutils/tst_stringutils.cpp +++ b/tests/auto/utils/stringutils/tst_stringutils.cpp @@ -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++) |