@@ -57,7 +57,7 @@ public void testAnyString() {
57
57
58
58
public void testChar () {
59
59
RegExp re = new RegExp ("c" );
60
- assertEquals ("\\ c" , re .toString ());
60
+ assertEquals ("c" , re .toString ());
61
61
assertEquals ("REGEXP_CHAR char=c\n " , re .toStringTree ());
62
62
63
63
Automaton actual = re .toAutomaton ();
@@ -69,7 +69,7 @@ public void testChar() {
69
69
70
70
public void testCaseInsensitiveChar () {
71
71
RegExp re = new RegExp ("c" , RegExp .NONE , RegExp .ASCII_CASE_INSENSITIVE );
72
- assertEquals ("\\ c" , re .toString ());
72
+ assertEquals ("c" , re .toString ());
73
73
assertEquals ("REGEXP_CHAR char=c\n " , re .toStringTree ());
74
74
75
75
Automaton actual = re .toAutomaton ();
@@ -113,7 +113,7 @@ public void testCaseInsensitiveClassRangeCompression() {
113
113
114
114
public void testCaseInsensitiveCharUpper () {
115
115
RegExp re = new RegExp ("C" , RegExp .NONE , RegExp .ASCII_CASE_INSENSITIVE );
116
- assertEquals ("\\ C" , re .toString ());
116
+ assertEquals ("C" , re .toString ());
117
117
assertEquals ("REGEXP_CHAR char=C\n " , re .toStringTree ());
118
118
119
119
Automaton actual = re .toAutomaton ();
@@ -174,7 +174,7 @@ public void testCaseInsensitiveCharUnicodeSigma() {
174
174
public void testNegatedChar () {
175
175
RegExp re = new RegExp ("[^c]" );
176
176
// TODO: would be nice to emit negated class rather than this
177
- assertEquals ("(.&~(\\ c))" , re .toString ());
177
+ assertEquals ("(.&~(c))" , re .toString ());
178
178
assertEquals (
179
179
String .join (
180
180
"\n " ,
@@ -211,7 +211,7 @@ public void testNegatedClass() {
211
211
212
212
public void testCharRange () {
213
213
RegExp re = new RegExp ("[b-d]" );
214
- assertEquals ("[\\ b- \\ d]" , re .toString ());
214
+ assertEquals ("[b- d]" , re .toString ());
215
215
assertEquals ("REGEXP_CHAR_RANGE from=b to=d\n " , re .toStringTree ());
216
216
217
217
Automaton actual = re .toAutomaton ();
@@ -224,7 +224,7 @@ public void testCharRange() {
224
224
public void testNegatedCharRange () {
225
225
RegExp re = new RegExp ("[^b-d]" );
226
226
// TODO: would be nice to emit negated class rather than this
227
- assertEquals ("(.&~([\\ b- \\ d]))" , re .toString ());
227
+ assertEquals ("(.&~([b- d]))" , re .toString ());
228
228
assertEquals (
229
229
String .join (
230
230
"\n " ,
@@ -514,7 +514,7 @@ public void testEmptyInterval() {
514
514
515
515
public void testOptional () {
516
516
RegExp re = new RegExp ("a?" );
517
- assertEquals ("(\\ a)?" , re .toString ());
517
+ assertEquals ("(a)?" , re .toString ());
518
518
assertEquals (String .join ("\n " , "REGEXP_OPTIONAL" , " REGEXP_CHAR char=a\n " ), re .toStringTree ());
519
519
520
520
Automaton actual = re .toAutomaton ();
@@ -526,7 +526,7 @@ public void testOptional() {
526
526
527
527
public void testRepeat0 () {
528
528
RegExp re = new RegExp ("a*" );
529
- assertEquals ("(\\ a)*" , re .toString ());
529
+ assertEquals ("(a)*" , re .toString ());
530
530
assertEquals (String .join ("\n " , "REGEXP_REPEAT" , " REGEXP_CHAR char=a\n " ), re .toStringTree ());
531
531
532
532
Automaton actual = re .toAutomaton ();
@@ -538,7 +538,7 @@ public void testRepeat0() {
538
538
539
539
public void testRepeat1 () {
540
540
RegExp re = new RegExp ("a+" );
541
- assertEquals ("(\\ a){1,}" , re .toString ());
541
+ assertEquals ("(a){1,}" , re .toString ());
542
542
assertEquals (
543
543
String .join ("\n " , "REGEXP_REPEAT_MIN min=1" , " REGEXP_CHAR char=a\n " ), re .toStringTree ());
544
544
@@ -553,7 +553,7 @@ public void testRepeat1() {
553
553
554
554
public void testRepeatN () {
555
555
RegExp re = new RegExp ("a{5}" );
556
- assertEquals ("(\\ a){5,5}" , re .toString ());
556
+ assertEquals ("(a){5,5}" , re .toString ());
557
557
assertEquals (
558
558
String .join ("\n " , "REGEXP_REPEAT_MINMAX min=5 max=5" , " REGEXP_CHAR char=a\n " ),
559
559
re .toStringTree ());
@@ -567,7 +567,7 @@ public void testRepeatN() {
567
567
568
568
public void testRepeatNPlus () {
569
569
RegExp re = new RegExp ("a{5,}" );
570
- assertEquals ("(\\ a){5,}" , re .toString ());
570
+ assertEquals ("(a){5,}" , re .toString ());
571
571
assertEquals (
572
572
String .join ("\n " , "REGEXP_REPEAT_MIN min=5" , " REGEXP_CHAR char=a\n " ), re .toStringTree ());
573
573
@@ -582,7 +582,7 @@ public void testRepeatNPlus() {
582
582
583
583
public void testRepeatMN () {
584
584
RegExp re = new RegExp ("a{5,8}" );
585
- assertEquals ("(\\ a){5,8}" , re .toString ());
585
+ assertEquals ("(a){5,8}" , re .toString ());
586
586
assertEquals (
587
587
String .join ("\n " , "REGEXP_REPEAT_MINMAX min=5 max=8" , " REGEXP_CHAR char=a\n " ),
588
588
re .toStringTree ());
@@ -659,7 +659,7 @@ public void testNotTerminatedString() {
659
659
660
660
public void testConcatenation () {
661
661
RegExp re = new RegExp ("[b-c][e-f]" );
662
- assertEquals ("[\\ b- \\ c][\\ e- \\ f]" , re .toString ());
662
+ assertEquals ("[b- c][e- f]" , re .toString ());
663
663
assertEquals (
664
664
String .join (
665
665
"\n " ,
@@ -679,7 +679,7 @@ public void testConcatenation() {
679
679
680
680
public void testIntersection () {
681
681
RegExp re = new RegExp ("[b-f]&[e-f]" );
682
- assertEquals ("([\\ b- \\ f]&[\\ e- \\ f])" , re .toString ());
682
+ assertEquals ("([b- f]&[e- f])" , re .toString ());
683
683
assertEquals (
684
684
String .join (
685
685
"\n " ,
@@ -714,7 +714,7 @@ public void testTruncatedIntersectionParens() {
714
714
715
715
public void testUnion () {
716
716
RegExp re = new RegExp ("[b-c]|[e-f]" );
717
- assertEquals ("([\\ b- \\ c]|[\\ e- \\ f])" , re .toString ());
717
+ assertEquals ("([b- c]|[e- f])" , re .toString ());
718
718
assertEquals (
719
719
String .join (
720
720
"\n " ,
0 commit comments