public void TestSingleNewLine() { var buffer = Encoding.ASCII.GetBytes("Hello\nWorld!"); var reader = new BufferSliceReader(buffer, 0, buffer.Length, Encoding.ASCII); var actual = reader.ReadLine(); Assert.Equal("Hello", actual); }
public void ReadLineWithRN() { var buffer = Encoding.ASCII.GetBytes("Hello\r\nWorld!"); var reader = new BufferSliceReader(buffer, 0, buffer.Length, Encoding.ASCII); var actual = reader.ReadLine(); var actual2 = reader.ReadToEnd(); Assert.Equal("Hello", actual); Assert.Equal("World!", actual2); }