public void SplitArgumentsWithQuotesAtEnd_ReturnsExpected() { string input = "one \"two three four\""; string[] result = CommandArguments.Split(input); Assert.Equal(2, result.Length); Assert.Equal("one", result[0]); Assert.Equal("two three four", result[1]); }
public void SplitArgumentsWithQuotesAtBeginning_ReturnsExpected() { string input = "\"one \"two three four"; string[] result = CommandArguments.Split(input); Assert.Equal(4, result.Length); Assert.Equal("one ", result[0]); Assert.Equal("two", result[1]); Assert.Equal("three", result[2]); Assert.Equal("four", result[3]); }
public void SplitExtraSpacedArgumentsWithoutQuotes_ReturnsExpected() { string input = "one two three four"; string[] result = CommandArguments.Split(input); Assert.Equal(4, result.Length); Assert.Equal("one", result[0]); Assert.Equal("two", result[1]); Assert.Equal("three", result[2]); Assert.Equal("four", result[3]); }