diff options
author | Richard Linden <none@none> | 2011-08-19 16:41:53 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-08-19 16:41:53 -0700 |
commit | 93645cf55cb276c098232e81b9b548968ab4e4b3 (patch) | |
tree | 9e7505b0e96bb59cdfb31503d8b5fbdfd05ad40d /indra/llcommon/tests/llstring_test.cpp | |
parent | e15c97404f1e69745e055beea53aef67f5aa8ccc (diff) |
fix for not properly handling nested brackets in
string replacement, e.g. [[FOO]]
Diffstat (limited to 'indra/llcommon/tests/llstring_test.cpp')
-rw-r--r-- | indra/llcommon/tests/llstring_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index 304e91ed92..dd4bc0b039 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -624,6 +624,14 @@ namespace tut subcount = LLStringUtil::format(s, fmt_map); ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "?Am I not a long string?short[A]bbbaaaba[A]"); ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount); + + // Test on nested brackets + std::string srcs6 = "[[TRICK1]][[A]]"; + s = srcs6; + subcount = LLStringUtil::format(s, fmt_map); + ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "[[A]][a]"); + ensure_equals("LLStringUtil::format: Assorted Test2 result count", 2, subcount); + // Test an assorted substitution std::string srcs8 = "foo[DELETE]bar?"; |