public void TestMultipleCommandsSplit() { IList <string> commands = CCommandSplitter.Split("test1 && test2"); AssertList(commands, "test1", "test2"); }
public void TestMultipleCommandsWithArgSplit() { IList <string> commands = CCommandSplitter.Split("test1 --arg1 && test2 --arg2"); AssertList(commands, "test1 --arg1", "test2 --arg2"); }
public void TestSingleCommandWithArgsSingleQuotesAndInnerQuotesSplit() { IList <string> commands = CCommandSplitter.Split("test --arg1 'argument \"&&\" quotes'"); AssertList(commands, "test --arg1 'argument \"&&\" quotes'"); }
public void TestSingleCommandWithArgsQuotesAndInnerSingleQuotesSplit() { IList <string> commands = CCommandSplitter.Split("test --arg1 \"argument '&&' quotes\""); AssertList(commands, "test --arg1 \"argument '&&' quotes\""); }
public void TestSingleCommandWithArgsSplit() { IList <string> commands = CCommandSplitter.Split("test --arg1 --arg2"); AssertList(commands, "test --arg1 --arg2"); }
public void TestSingleCommandSplit() { IList <string> commands = CCommandSplitter.Split("test"); AssertList(commands, "test"); }
public void TestMoar() { IList <string> commands = CCommandSplitter.Split("bind t 'echo \"test-1\" && echo \"test-2\"'"); AssertList(commands, "bind t 'echo \"test-1\" && echo \"test-2\"'"); }
public void TestMultipleCommandsWithArgsSingleQuotesAndInnerQuotesSplit() { IList <string> commands = CCommandSplitter.Split("test1 --arg1 'a1 \"&&\" a2' && test2 --arg2 'b1 \"&&\" b2'"); AssertList(commands, "test1 --arg1 'a1 \"&&\" a2'", "test2 --arg2 'b1 \"&&\" b2'"); }
public void TestMultipleCommandsWithArgsQuotesAndInnerQuotesSplit() { IList <string> commands = CCommandSplitter.Split("test1 --arg1 \"a1 \\\"&&\\\" a2\" && test2 --arg2 \"b1 \\\"&&\\\" b2\""); AssertList(commands, "test1 --arg1 \"a1 \\\"&&\\\" a2\"", "test2 --arg2 \"b1 \\\"&&\\\" b2\""); }