Example #1
0
        public void NewLineInStringTest()
        {
            var lexer = Lexer.CreateState("\"\n\"");

            bool result = TextScanner.ScanString(lexer, ref this.token);

            Assert.False(result);
        }
Example #2
0
        public void EscapedDoubleQuoteInStringTest()
        {
            var lexer = Lexer.CreateState("\"\\\"\"");

            bool result = TextScanner.ScanString(lexer, ref this.token);

            Assert.True(result);
            Assert.Equal("\\\"", this.token.Value);
        }
Example #3
0
        public void TabsInStringTest()
        {
            var lexer = Lexer.CreateState("\"		\"");

            bool result = TextScanner.ScanString(lexer, ref this.token);

            Assert.True(result);
            Assert.Equal("\\t\\t", this.token.Value);
        }