Exemplo n.º 1
0
        public void GetUnquotedPathFromCommandCommandMismatch()
        {
            String path         = "\"c:\\testpath;z:\\stuff\"";
            String command      = "     .SymPath    +    ";
            String commandLine  = command + " " + path;
            String originalPath = "c:\\original";

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".srcpath");

            Assert.AreEqual(originalPath, outPath);
        }
Exemplo n.º 2
0
        public void GetUnquotedPathFromCommandLineNoParameterOriginalNull()
        {
            String path         = "";
            String command      = ".sympath";
            String commandLine  = command + " " + path;
            String originalPath = null;

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".sympath");

            Assert.AreEqual(null, outPath);
        }
Exemplo n.º 3
0
        public void GetUnquotedPathFromCommandLineParamOriginalNullConcat()
        {
            String path         = "c:\\testpath";
            String command      = ".sympath +";
            String commandLine  = command + " " + path;
            String originalPath = null;

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".sympath");

            Assert.AreEqual(path, outPath);
        }
Exemplo n.º 4
0
 public void GetUnquotedPathFromCommandLineNullCommand()
 {
     try
     {
         StackHashScriptSettings.GetUnquotedPathFromCommandLine(null, ".sympath", null);
     }
     catch (System.ArgumentNullException ex)
     {
         Assert.AreEqual("command", ex.ParamName);
         throw;
     }
 }
Exemplo n.º 5
0
        public void GetUnquotedPathFromCommandCalledTwiceNoConcat()
        {
            String path         = "c:\\path";
            String command      = "     .SymPath        ";
            String commandLine  = command + " " + path;
            String originalPath = "c:\\original";

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".sympath");

            outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(outPath, commandLine, ".sympath");

            Assert.AreEqual(path, outPath);
        }
Exemplo n.º 6
0
        public void GetUnquotedPathFromCommandLineQuotesAndSpaceAndCase()
        {
            String path         = "\"c:\\testpath;z:\\stuff\"";
            String command      = "     .SymPath    +    ";
            String commandLine  = command + " " + path;
            String originalPath = "c:\\original";

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".sympath");

            String expectedResult = originalPath + ";" + "c:\\testpath;z:\\stuff";

            Assert.AreEqual(expectedResult, outPath);
        }
Exemplo n.º 7
0
        public void GetUnquotedPathFromCommandLineQuotesNoConcat()
        {
            String path         = "\"c:\\testpath\"";
            String command      = ".sympath   ";
            String commandLine  = command + " " + path;
            String originalPath = "c:\\original";

            String outPath = StackHashScriptSettings.GetUnquotedPathFromCommandLine(originalPath, commandLine, ".sympath");

            String expectedResult = "c:\\testpath";

            Assert.AreEqual(expectedResult, outPath);
        }