test CommandParser ignores newlines at end of command
This commit is contained in:
parent
fbc942c4f7
commit
903b35f8bb
@ -43,7 +43,7 @@ TEST(CommandParser_parse, parses_a_basic_command)
|
||||
|
||||
TEST(CommandParser_parse, parses_a_command_with_quoted_arguments)
|
||||
{
|
||||
EncodedString command("echo 'Hello There'\" World!\" a'b'c d\"e\"f ' ' \"\" 1 2 3");
|
||||
EncodedString command("echo 'Hello There'\" World!\" a'b'c d\"e\"f ' ' \"\" 1 2 3\n");
|
||||
CommandParser cp;
|
||||
EXPECT_TRUE(cp.parse(command));
|
||||
compare_parsed(std::vector<EncodedString>({
|
||||
@ -61,7 +61,7 @@ TEST(CommandParser_parse, parses_a_command_with_quoted_arguments)
|
||||
|
||||
TEST(CommandParser_parse, parses_a_command_with_escaped_characters)
|
||||
{
|
||||
EncodedString command(" echo \\ ' \\' a ' \"b \\\" c\" \\\\too");
|
||||
EncodedString command(" echo \\ ' \\' a ' \"b \\\" c\" \\\\too\n");
|
||||
CommandParser cp;
|
||||
EXPECT_TRUE(cp.parse(command));
|
||||
compare_parsed(std::vector<EncodedString>({
|
||||
|
Loading…
x
Reference in New Issue
Block a user