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;
}
RecordParameter(parsedParameters, expectedParameter,
_.text.FromFormattedString(textValue));
_.text.FromString(textValue));
return true;
}
@ -575,7 +575,7 @@ private final function bool ParseRemainderValue(
return false;
}
RecordParameter(parsedParameters, expectedParameter,
_.text.FromFormattedString(textValue));
_.text.FromString(textValue));
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(Text(paramArray.GetItem(0)).ToString() == "dk");
TEST_ExpectTrue(Text(paramArray.GetItem(1)).ToString() == "someone");
TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToFormattedString()
== "complex {rgb(123,45,72) string}");
TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToString()
== "complex {#7b2d48 string}");
}
protected static function SubTest_MockAQ4()

Loading…
Cancel
Save