Author: raja
Date: 2005-05-24 06:28:19 -0400 (Tue, 24 May 2005)
New Revision: 44925

Modified:
   trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
   trunk/mcs/class/System/System.Text.RegularExpressions/replace.cs
   trunk/mcs/class/System/Test/System.Text.RegularExpressions/
   trunk/mcs/class/System/Test/System.Text.RegularExpressions/ChangeLog
   trunk/mcs/class/System/Test/System.Text.RegularExpressions/RegexReplace.cs
Log:
In Test/System.Text.RegularExpressions:
        * RegexReplace.cs: Add testcase for $+.

In System.Text.RegularExpressions:
        * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
        returned by $+.


Modified: trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2005-05-24 09:25:26 UTC (rev 44924)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/ChangeLog     
2005-05-24 10:28:19 UTC (rev 44925)
@@ -1,3 +1,8 @@
+2005-05-24  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
+       returned by $+.
+
 2005-05-20  Ben Maurer  <[EMAIL PROTECTED]>
 
        * regex.cs: Some memory allocation optimizations.

Modified: trunk/mcs/class/System/System.Text.RegularExpressions/replace.cs
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/replace.cs    
2005-05-24 09:25:26 UTC (rev 44924)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/replace.cs    
2005-05-24 10:28:19 UTC (rev 44925)
@@ -162,7 +162,7 @@
                                return new Term (TermOp.PostMatch, 0);
 
                        case '+':                       // last group
-                               return new Term (TermOp.Match, regex.GroupCount 
- 1);
+                               return new Term (TermOp.Match, 
regex.GroupCount);
 
                        case '_':                       // entire text
                                return new Term (TermOp.All, 0);


Property changes on: trunk/mcs/class/System/Test/System.Text.RegularExpressions
___________________________________________________________________
Name: svn:ignore
   + semantic.cache


Modified: trunk/mcs/class/System/Test/System.Text.RegularExpressions/ChangeLog
===================================================================
--- trunk/mcs/class/System/Test/System.Text.RegularExpressions/ChangeLog        
2005-05-24 09:25:26 UTC (rev 44924)
+++ trunk/mcs/class/System/Test/System.Text.RegularExpressions/ChangeLog        
2005-05-24 10:28:19 UTC (rev 44925)
@@ -1,3 +1,7 @@
+2005-05-24  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * RegexReplace.cs: Add testcase for $+.
+
 2005-05-20  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * RegexReplace.cs: New file.  Most of the tests were inspired by

Modified: 
trunk/mcs/class/System/Test/System.Text.RegularExpressions/RegexReplace.cs
===================================================================
--- trunk/mcs/class/System/Test/System.Text.RegularExpressions/RegexReplace.cs  
2005-05-24 09:25:26 UTC (rev 44924)
+++ trunk/mcs/class/System/Test/System.Text.RegularExpressions/RegexReplace.cs  
2005-05-24 10:28:19 UTC (rev 44925)
@@ -61,6 +61,8 @@
                        new testcase ("text",   "(?<foo>e)(?<foo>x)",   
"${foo}$1$2",           "txx$2t"        ),
                        new testcase ("text",   "(e)(?<foo>x)",         
"${foo}$1$2",           "txext"         ),
                        new testcase ("text",   "(?<foo>e)(x)",         
"${foo}$1$2",           "texet"         ),
+                       new testcase ("text",   "(e)(?<foo>x)",         
"${foo}$1$2$+",         "txexxt"        ),
+                       new testcase ("text",   "(?<foo>e)(x)",         
"${foo}$1$2$+",         "texeet"        ),
                };
 
                [Test]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to