Ejemplo n.º 1
0
        public void TestMultipleCommandsSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test1 && test2");

            AssertList(commands, "test1", "test2");
        }
Ejemplo n.º 2
0
        public void TestMultipleCommandsWithArgSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test1 --arg1 && test2 --arg2");

            AssertList(commands, "test1 --arg1", "test2 --arg2");
        }
Ejemplo n.º 3
0
        public void TestSingleCommandWithArgsSingleQuotesAndInnerQuotesSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test --arg1 'argument \"&&\" quotes'");

            AssertList(commands, "test --arg1 'argument \"&&\" quotes'");
        }
Ejemplo n.º 4
0
        public void TestSingleCommandWithArgsQuotesAndInnerSingleQuotesSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test --arg1 \"argument '&&' quotes\"");

            AssertList(commands, "test --arg1 \"argument '&&' quotes\"");
        }
Ejemplo n.º 5
0
        public void TestSingleCommandWithArgsSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test --arg1 --arg2");

            AssertList(commands, "test --arg1 --arg2");
        }
Ejemplo n.º 6
0
        public void TestSingleCommandSplit()
        {
            IList <string> commands = CCommandSplitter.Split("test");

            AssertList(commands, "test");
        }
Ejemplo n.º 7
0
        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\"'");
        }
Ejemplo n.º 8
0
        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'");
        }
Ejemplo n.º 9
0
        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\"");
        }