Exemplo n.º 1
0
 public void DQ_OneSequence()
 {
     String input = "\"" + @"some`rstring" + "\"";
       var parser = new PsStringScanner(input);
       Assert.Equal(new StringPart(5,2), parser.Next());
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 2
0
 public void DQ_HS_OneEscape()
 {
     String input = "@\"\r\n" + @"some`nstring" + "\r\n\"@";
       var parser = new PsStringScanner(input);
       Assert.Equal(new StringPart(8,2), parser.Next());
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 3
0
 public void DQ_HS_EmbeddedQuotes()
 {
     String input = "@\"\r\n\"" + @"some`nstring" + "\"\r\n\"@";
       var parser = new PsStringScanner(input);
       Assert.Equal(new StringPart(9,2), parser.Next());
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 4
0
 public void DQ_EscapedBacktick()
 {
     String input = "\"" + @"some``nstring" + "\"";
       var parser = new PsStringScanner(input);
       Assert.Equal(new StringPart(5,2), parser.Next());
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 5
0
 public void DQ_TwoSequencesNotContigous()
 {
     String input = "\"" + @"some`rother`nstring" + "\"";
       var parser = new PsStringScanner(input);
       Assert.Equal(new StringPart(5,2), parser.Next());
       Assert.Equal(new StringPart(12,2), parser.Next());
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 6
0
 public void SQ_EmptyReturnsNull()
 {
     String input = "''";
       var parser = new PsStringScanner(input);
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 7
0
 public void SQ_HS_EmbeddedQuotes()
 {
     String input = "@'\r\n'" + @"some`nstring" + "'\r\n'@";
       var parser = new PsStringScanner(input);
       Assert.Equal(null, parser.Next());
 }
Exemplo n.º 8
0
 public void SQ_EscapesAreIgnored()
 {
     String input = "'some`rstring'";
       var parser = new PsStringScanner(input);
       Assert.Equal(null, parser.Next());
 }