Exemple #1
0
            public void ShouldHandleTrailingDoubledash()
            {
                var args = new string[] { "scriptname.csx", "-restore", "--" };

                var sr = ArgumentHandler.SplitScriptArgs(args);

                sr.CommandArguments.ShouldEqual(new[] { "scriptname.csx", "-restore" });
                sr.ScriptArguments.ShouldEqual(new string[0]);
            }
Exemple #2
0
            public void ShouldHandleJustDoubledash()
            {
                var args = new string[] { "--" };

                var sr = ArgumentHandler.SplitScriptArgs(args);

                sr.CommandArguments.ShouldEqual(new string[0]);
                sr.ScriptArguments.ShouldEqual(new string[0]);
            }
Exemple #3
0
            public void ShouldHandleArgsAndScriptArgs()
            {
                var args = new string[] { "scriptname.csx", "-restore", "--", "-port", "8080" };

                var sr = ArgumentHandler.SplitScriptArgs(args);

                sr.CommandArguments.ShouldEqual(new[] { "scriptname.csx", "-restore" });
                sr.ScriptArguments.ShouldEqual(new[] { "-port", "8080" });
            }
Exemple #4
0
            public void ShouldHandleJustScriptArgs()
            {
                var args = new string[] { "--", "-port", "8080" };

                var sr = ArgumentHandler.SplitScriptArgs(args);

                sr.CommandArguments.ShouldEqual(new string[0]);
                sr.ScriptArguments.ShouldEqual(new[] { "-port", "8080" });
            }
Exemple #5
0
            public void ShouldHandleEmptyArgs()
            {
                var args = new string[0];

                var sr = ArgumentHandler.SplitScriptArgs(args);

                sr.CommandArguments.ShouldEqual(new string[0]);
                sr.ScriptArguments.ShouldEqual(new string[0]);
            }