Esempio n. 1
0
        public void Test_Format_3()
        {
            FormattedCode exp;
            FormattedCode res;

            // Ensure that escaping sequences are
            // handled correctly
            //                    0  2           14   17    21
            res = _parser.Format("s=\"<font class=\\\"cls\\\">hi, there!</font>");

            exp = new FormattedCode(
                "s=\"<font class=\\\"cls\\\">hi, there!</font>",
                new int[] { 0, 2 },
                new byte[] { 0, 3 },
                new int[] { 0 });

            Assert.That(res, Is.EqualTo(exp));

            _parser = new TestingCSharpCodeFormatter();

            //                   0  2
            res = _parser.Format("s=\"<font class=\\\\\"cls\\\">hi, there!</font>");
            exp = new FormattedCode(
                "s=\"<font class=\\\\\"cls\\\">hi, there!</font>",
                new int[] { 0, 2, 18, 22 },
                new byte[] { 0, 3, 0, 3 },
                new int[] { 0 });

            Assert.That(res, Is.EqualTo(exp));

            return;
        }
Esempio n. 2
0
        public void SetUp()
        {
            _parser = new TestingCSharpCodeFormatter();

            return;
        }
Esempio n. 3
0
        public void SetUp()
        {
            _parser = new TestingCSharpCodeFormatter();

            return;
        }
Esempio n. 4
0
        public void Test_Format_3()
        {
            FormattedCode exp;
            FormattedCode res;

            // Ensure that escaping sequences are
            // handled correctly
            //                    0  2           14   17    21        
            res = _parser.Format("s=\"<font class=\\\"cls\\\">hi, there!</font>");

            exp = new FormattedCode(
                "s=\"<font class=\\\"cls\\\">hi, there!</font>",
                new int[] { 0, 2 },
                new byte[] { 0, 3 },
                new int[] { 0 });

            Assert.That(res, Is.EqualTo(exp));

            _parser = new TestingCSharpCodeFormatter();

            //                   0  2              
            res = _parser.Format("s=\"<font class=\\\\\"cls\\\">hi, there!</font>");
            exp = new FormattedCode(
                "s=\"<font class=\\\\\"cls\\\">hi, there!</font>",
                new int[] { 0, 2, 18, 22 },
                new byte[] { 0, 3, 0, 3 },
                new int[] { 0 });

            Assert.That(res, Is.EqualTo(exp));

            return;
        }