示例#1
0
        public void FindAnyWordSpan3()
        {
            Create("foo bar baz");
            var span = TssUtil.FindAnyWordSpan(_textBuffer.CurrentSnapshot.GetLineFromLineNumber(0).Extent, WordKind.NormalWord, Path.Backward);

            Assert.IsTrue(span.IsSome());
            Assert.AreEqual("baz", span.Value.GetText());
        }
示例#2
0
        public void FindAnyWordSpan2()
        {
            Create("foo bar baz");
            var span = TssUtil.FindAnyWordSpan(new SnapshotSpan(_textBuffer.CurrentSnapshot, 0, 2), WordKind.BigWord, Path.Forward);

            Assert.IsTrue(span.IsSome());
            Assert.AreEqual("fo", span.Value.GetText());
        }
示例#3
0
        public void FindAnyWordSpan4()
        {
            Create("foo bar baz");
            var span = TssUtil.FindAnyWordSpan(
                new SnapshotSpan(_textBuffer.CurrentSnapshot, 0, _textBuffer.CurrentSnapshot.GetLineFromLineNumber(0).End.Subtract(1).Position),
                WordKind.NormalWord,
                Path.Backward);

            Assert.IsTrue(span.IsSome());
            Assert.AreEqual("ba", span.Value.GetText());
        }