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); }
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); }
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); }
public void GetUnquotedPathFromCommandLineNullCommand() { try { StackHashScriptSettings.GetUnquotedPathFromCommandLine(null, ".sympath", null); } catch (System.ArgumentNullException ex) { Assert.AreEqual("command", ex.ParamName); throw; } }
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); }
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); }
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); }