Exemple #1
0
        public void FindPreviousOccuranceOfCharOnLine1()
        {
            Create("foo bar baz");
            var prev = TssUtil.FindPreviousOccurranceOfCharOnLine(_textBuffer.GetPoint(0), 'f', 1);

            Assert.IsFalse(prev.IsSome());
        }
Exemple #2
0
        public void FindPreviousOccuranceOfCharOnLine3()
        {
            Create("foo bar baz");
            var prev = TssUtil.FindPreviousOccurranceOfCharOnLine(_textBuffer.GetPoint(5), 'o', 2);

            Assert.IsTrue(prev.IsSome());
            Assert.AreEqual(1, prev.Value.Position);
        }