Esempio n. 1
0
        public void GetLineColumnFromPositionTest()
        {
            var tb = new TextBufferMock("a\r\nb", "R");

            int line, col;

            tb.GetLineColumnFromPosition(0, out line, out col);
            line.Should().Be(0);
            col.Should().Be(0);

            tb.GetLineColumnFromPosition(1, out line, out col);
            line.Should().Be(0);
            col.Should().Be(1);

            tb.GetLineColumnFromPosition(3, out line, out col);
            line.Should().Be(1);
            col.Should().Be(0);
        }