Exemplo n.º 1
0
        public void colorize_multiple_pattern_matches_order(string original, string expected)
        {
            var pattern = new Crayons.Patterns.Pattern();
            pattern.Add(@"(?<yellow>'.+?')");
            pattern.Add(@"(?<red>\[.+?\])");

            var str = pattern.Colorize(original);
            str.ToString().ShouldEqual(expected);
        }
Exemplo n.º 2
0
        public void colorize_multiple_instances(string original, string expected)
        {
            var pattern = new Crayons.Patterns.Pattern();
            pattern.Add(@"(?<red>\[.+?\])");

            var str = pattern.Colorize(original);
            str.ToString().ShouldEqual(expected);
        }