示例#1
0
        public void CanRenderRaw()
        {
            var parser = new ConsoleTokenParser();

            var imp = "Hello ^red;World!^;";

            parser.Scan(imp);

            var raw = parser.Render((i, t) => t.RawText);

            Assert.Equal(imp, raw);
        }
示例#2
0
        public void Empty()
        {
            var parser = new ConsoleTokenParser();

            var imp = "No tokens at all";

            parser.Scan(imp);


            var raw = parser.Render((i, x) => x.IsLiteral ? x.Text : x.Text.Trim('^', ';'));

            Assert.Equal("No tokens at all", raw);
        }