Browse Source

Change Commands to parse input `Text` as plain

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
c3aca531f1
  1. 4
      sources/Commands/CommandParser.uc
  2. 4
      sources/Commands/Tests/TEST_Command.uc

4
sources/Commands/CommandParser.uc

@ -556,7 +556,7 @@ private final function bool ParseTextValue(
return false; return false;
} }
RecordParameter(parsedParameters, expectedParameter, RecordParameter(parsedParameters, expectedParameter,
_.text.FromFormattedString(textValue)); _.text.FromString(textValue));
return true; return true;
} }
@ -575,7 +575,7 @@ private final function bool ParseRemainderValue(
return false; return false;
} }
RecordParameter(parsedParameters, expectedParameter, RecordParameter(parsedParameters, expectedParameter,
_.text.FromFormattedString(textValue)); _.text.FromString(textValue));
return true; return true;
} }

4
sources/Commands/Tests/TEST_Command.uc

@ -279,8 +279,8 @@ protected static function SubTest_MockAQ3()
TEST_ExpectTrue(paramArray.GetLength() == 3); TEST_ExpectTrue(paramArray.GetLength() == 3);
TEST_ExpectTrue(Text(paramArray.GetItem(0)).ToString() == "dk"); TEST_ExpectTrue(Text(paramArray.GetItem(0)).ToString() == "dk");
TEST_ExpectTrue(Text(paramArray.GetItem(1)).ToString() == "someone"); TEST_ExpectTrue(Text(paramArray.GetItem(1)).ToString() == "someone");
TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToFormattedString() TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToString()
== "complex {rgb(123,45,72) string}"); == "complex {#7b2d48 string}");
} }
protected static function SubTest_MockAQ4() protected static function SubTest_MockAQ4()

Loading…
Cancel
Save