From bf7c215692435ceb85d8991a9337933688dc0cf0 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Sun, 26 Feb 2012 07:17:08 -0500
Subject: [PATCH] Add LLStringUtil::getTokens() test for quoted empty string.
 This is an important differentiator between getTokens() and the present
 LLCommandLineParser::parseCommandLineString() logic: you cannot currently
 --set SomeVar to an empty string value because parseCommandLineString()
 discards empty strings.

---
 indra/llcommon/tests/llstring_test.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp
index 821deeac21a..93d3968dbfc 100644
--- a/indra/llcommon/tests/llstring_test.cpp
+++ b/indra/llcommon/tests/llstring_test.cpp
@@ -847,6 +847,9 @@ namespace tut
 		ensure_getTokens("adjacent quoted",
 						 "abc'def \"ghi'\"jkl' mno\"pqr", " ", "", "\"'",
 						 list_of("abcdef \"ghijkl' mnopqr"));
+		ensure_getTokens("quoted empty string",
+						 "--set SomeVar ''", " ", "", "'",
+						 list_of("--set")("SomeVar")(""));
 
 		// escapes
 		// Don't use backslash as an escape for these tests -- you'll go nuts
-- 
GitLab