From 7ff36a724db0765de38370e054ef3393a65443a7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 19 Aug 2011 16:45:39 -0700 Subject: better unit test for nested brackets in string replacement --- indra/llcommon/tests/llstring_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/tests') diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index dd4bc0b039..6a1cbf652a 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -626,11 +626,11 @@ namespace tut ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount); // Test on nested brackets - std::string srcs6 = "[[TRICK1]][[A]]"; + std::string srcs6 = "[[TRICK1]][[A]][[B]][[AAA]][[BBB]][[TRICK2]][[KEYLONGER]][[KEYSHORTER]]?[[DELETE]]"; 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); + ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "[[A]][a][b][aaa][bbb][[A]][short][Am I not a long string?]?[]"); + ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount); // Test an assorted substitution -- cgit v1.2.3