public void TestParseArguments() { ScriptParser sp = new ScriptParser(); Assert.AreEqual(new List <string> { "a", "a b" }, sp.ParseArguments("a \"a b\"")); Assert.AreEqual(new List <string> { "a b", "a" }, sp.ParseArguments("\"a b\" a")); }
public void TestMissingWhiteSpaceAfterClosingQuote() { ScriptParser sp = new ScriptParser(); Assert.Throws <ScriptParserException>( () => sp.ParseArguments("\"b\"a")); }
public void TestMissingWhiteSpace() { ScriptParser sp = new ScriptParser(); Assert.AreEqual(new List <string> { "a\"b\"" }, sp.ParseArguments("a\"b\"")); }