Exemplo n.º 1
0
        public void FindPreviousWordSpan6()
        {
            Create("foo bar");
            var line = _snapshot.GetLineFromLineNumber(0);
            var span = TssUtil.FindPreviousWordSpan(line.End, WordKind.NormalWord);

            Assert.AreEqual("bar", span.GetText());
        }
Exemplo n.º 2
0
        public void FindPreviousWordSpan7()
        {
            Create("    foo bar");
            var line = _snapshot.GetLineFromLineNumber(0);
            var span = TssUtil.FindPreviousWordSpan(line.Start.Add(2), WordKind.NormalWord);

            Assert.AreEqual(0, span.Length);
            Assert.AreEqual(line.Start, span.Start);
        }
Exemplo n.º 3
0
        public void FindPreviousWordSpan4()
        {
            Create("foo bar");
            var line  = _snapshot.GetLineFromLineNumber(0);
            var point = line.Start + 4;

            Assert.AreEqual('b', point.GetChar());
            var span = TssUtil.FindPreviousWordSpan(point, WordKind.NormalWord);

            Assert.AreEqual("foo", span.GetText());
        }