Author: juraj
Date: 2006-06-09 05:17:40 -0400 (Fri, 09 Jun 2006)
New Revision: 61593

Modified:
   trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
   trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
   trunk/mcs/class/System.Data/Test/ChangeLog
   trunk/mcs/class/System.Data/Test/System.Data/DataTableTest.cs
Log:
2006-06-09  Juraj Skripsky <[EMAIL PROTECTED]>

        * Tokenizer.cs (ProcessEscapes): Inspect the next character, not the one
        after that.

2006-06-09 Juraj Skripsky <[EMAIL PROTECTED]>

        * DataTableTest.cs (SelectEscaping): Add tests for calling Select()
        with escaped string literals.


Modified: trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog      
2006-06-09 06:37:04 UTC (rev 61592)
+++ trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog      
2006-06-09 09:17:40 UTC (rev 61593)
@@ -1,3 +1,8 @@
+2006-06-09  Juraj Skripsky <[EMAIL PROTECTED]>
+
+       * Tokenizer.cs (ProcessEscapes): Inspect the next character, not the one
+       after that.
+
 2006-05-02  Senganal T  <[EMAIL PROTECTED]>
 
        * Parser.jay : fix the rule for IsNull. Fixes bug #78254

Modified: trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs
===================================================================
--- trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs   
2006-06-09 06:37:04 UTC (rev 61592)
+++ trunk/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs   
2006-06-09 09:17:40 UTC (rev 61593)
@@ -143,7 +143,7 @@
                {
                        if (c == '\\') {
                                if (MoveNext())
-                                       c = Next();
+                                       c = Current ();
                                else
                                        c = '\0';
 

Modified: trunk/mcs/class/System.Data/Test/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/Test/ChangeLog  2006-06-09 06:37:04 UTC (rev 
61592)
+++ trunk/mcs/class/System.Data/Test/ChangeLog  2006-06-09 09:17:40 UTC (rev 
61593)
@@ -1,3 +1,8 @@
+2006-06-09 Juraj Skripsky <[EMAIL PROTECTED]>
+
+       * DataTableTest.cs (SelectEscaping): Add tests for calling Select()
+       with escaped string literals.
+
 2006-03-12     Boris Kirzner <[EMAIL PROTECTED]>
        * System.Data.Test.sln, System.Data.Test.vmwcsproj: 
        changes for automated testing for TARGET_JVM.

Modified: trunk/mcs/class/System.Data/Test/System.Data/DataTableTest.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/DataTableTest.cs       
2006-06-09 06:37:04 UTC (rev 61592)
+++ trunk/mcs/class/System.Data/Test/System.Data/DataTableTest.cs       
2006-06-09 09:17:40 UTC (rev 61593)
@@ -323,6 +323,22 @@
                        AssertEquals ("test#07", 1, T.Select ("age = 
'13'").Length);
 
                }
+               
+               [Test]
+               public void SelectEscaping () {
+                       DataTable dt = new DataTable ();
+                       dt.Columns.Add ("SomeCol");
+                       dt.Rows.Add (new object [] {"\t"});
+                       dt.Rows.Add (new object [] {"\\"});
+                       
+                       AssertEquals ("test#01", 1, dt.Select 
(@"SomeCol='\t'").Length);
+                       AssertEquals ("test#02", 1, dt.Select 
(@"SomeCol='\\'").Length);
+                       
+                       try {
+                               dt.Select (@"SomeCol='\x'");
+                               Fail("test#03");
+                       } catch (SyntaxErrorException) {}
+               }
 
                [Test]
                public void SelectOperators ()

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

Reply via email to