Example #1
0
 public void BracesInSingleQuotedStringAreIgnored()
 {
     String input = @"
     'some {}[]() braces here'
     ";
       var extractor = new PsBraceExtractor(BraceList);
       var chars = Extract(extractor, input.Trim(), 0, 0);
       Assert.Equal(0, chars.Count);
 }
Example #2
0
 public void SimpleFunction()
 {
     String input = @"
     function to-hex([long] $dec) {
        return '0x' + $dec.ToString('X')
     }";
       var extractor = new PsBraceExtractor(BraceList);
       var chars = Extract(extractor, input.Trim(), 0, 0);
       Assert.Equal(8, chars.Count);
 }
Example #3
0
 public void BracesInMultiLineCommentsAreIgnored()
 {
     String input = @"
     <#
     # some {}[]() braces here
     #>
     ";
       var extractor = new PsBraceExtractor(BraceList);
       var chars = Extract(extractor, input.Trim(), 0, 0);
       Assert.Equal(0, chars.Count);
 }