Пример #1
0
        public void HtmlTokenizer_SkipWhitespaceTest()
        {
            var           cs     = new HtmlCharStream("   abc\t\tdef\r\n gh");
            HtmlTokenizer target = new HtmlTokenizer(cs);

            target.SkipWhitespace();
            Assert.Equal(3, cs.Position);

            target.SkipWhitespace();
            Assert.Equal(3, cs.Position);

            cs.Advance(3);
            target.SkipWhitespace();
            Assert.Equal(8, cs.Position);

            cs.Advance(3);
            target.SkipWhitespace();
            Assert.Equal(14, cs.Position);
        }