Fix test cases for RegExp multiline
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 06:15:58 +0000 (06:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 06:15:58 +0000 (06:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80822

Patch by Hojong Han <hojong.han@samsung.com> on 2012-03-12
Reviewed by Gavin Barraclough.

* tests/mozilla/js1_2/regexp/RegExp_multiline.js:
* tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js:
* tests/mozilla/js1_2/regexp/beginLine.js:
* tests/mozilla/js1_2/regexp/endLine.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110540 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_multiline.js
Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js
Source/JavaScriptCore/tests/mozilla/js1_2/regexp/beginLine.js
Source/JavaScriptCore/tests/mozilla/js1_2/regexp/endLine.js

index cf25bc3..158ed9b 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-12  Hojong Han  <hojong.han@samsung.com>
+
+        Fix test cases for RegExp multiline
+        https://bugs.webkit.org/show_bug.cgi?id=80822
+
+        Reviewed by Gavin Barraclough.
+
+        * tests/mozilla/js1_2/regexp/RegExp_multiline.js:
+        * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js:
+        * tests/mozilla/js1_2/regexp/beginLine.js:
+        * tests/mozilla/js1_2/regexp/endLine.js:
+
 2012-03-12  Filip Pizlo  <fpizlo@apple.com>
 
         Arithmetic use inference should be procedure-global and should run in tandem
index be22261..de22876 100644 (file)
     // **Now we do the tests with RegExp.multiline set to true
     // RegExp.multiline = true; RegExp.multiline
     RegExp.multiline = true;
-       testcases[count++] = new TestCase ( SECTION, "RegExp.multiline = true; RegExp.multiline",
+    testcases[count++] = new TestCase ( SECTION, "RegExp.multiline = true; RegExp.multiline",
                                            true, RegExp.multiline);
 
     // (multiline == true) '123\n456'.match(/^4../)
-       testcases[count++] = new TestCase ( SECTION, "(multiline == true) '123\\n456'.match(/^4../)",
-                                           String(['456']), String('123\n456'.match(/^4../)));
+    testcases[count++] = new TestCase ( SECTION, "(multiline == true) '123\\n456'.match(/^4../m)",
+                                        String(['456']), String('123\n456'.match(/^4../m)));
 
     // (multiline == true) 'a11\na22\na23\na24'.match(/^a../g)
-       testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(/^a../g)",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/^a../g)));
+    testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(/^a../gm)",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/^a../gm)));
 
     // (multiline == true) 'a11\na22'.match(/^.+^./)
        //testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\na22'.match(/^.+^./)",
        //                                    String(['a11\na']), String('a11\na22'.match(/^.+^./)));
 
     // (multiline == true) '123\n456'.match(/.3$/)
-       testcases[count++] = new TestCase ( SECTION, "(multiline == true) '123\\n456'.match(/.3$/)",
-                                           String(['23']), String('123\n456'.match(/.3$/)));
+    testcases[count++] = new TestCase ( SECTION, "(multiline == true) '123\\n456'.match(/.3$/m)",
+                                        String(['23']), String('123\n456'.match(/.3$/m)));
 
     // (multiline == true) 'a11\na22\na23\na24'.match(/a..$/g)
-       testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(/a..$/g)",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/a..$/g)));
+    testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(/a..$/gm)",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/a..$/gm)));
 
     // (multiline == true) 'a11\na22\na23\na24'.match(new RegExp('a..$','g'))
-       testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','g'))",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','g'))));
+    testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','gm'))",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','gm'))));
 
     // (multiline == true) 'abc\ndef'.match(/c$....$/)
        //testcases[count++] = new TestCase ( SECTION, "(multiline == true) 'abc\ndef'.match(/c$.+$/)",
index 690653f..01734f5 100644 (file)
                                            true, RegExp['$*']);
 
     // (['$*'] == true) '123\n456'.match(/^4../)
-       testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) '123\\n456'.match(/^4../)",
-                                           String(['456']), String('123\n456'.match(/^4../)));
+    testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) '123\\n456'.match(/^4../m)",
+                                        String(['456']), String('123\n456'.match(/^4../m)));
 
     // (['$*'] == true) 'a11\na22\na23\na24'.match(/^a../g)
-       testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(/^a../g)",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/^a../g)));
+    testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(/^a../gm)",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/^a../gm)));
 
     // (['$*'] == true) 'a11\na22'.match(/^.+^./)
        //testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\na22'.match(/^.+^./)",
        //                                    String(['a11\na']), String('a11\na22'.match(/^.+^./)));
 
     // (['$*'] == true) '123\n456'.match(/.3$/)
-       testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) '123\\n456'.match(/.3$/)",
-                                           String(['23']), String('123\n456'.match(/.3$/)));
+    testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) '123\\n456'.match(/.3$/m)",
+                                        String(['23']), String('123\n456'.match(/.3$/m)));
 
     // (['$*'] == true) 'a11\na22\na23\na24'.match(/a..$/g)
-       testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(/a..$/g)",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/a..$/g)));
+    testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(/a..$/gm)",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(/a..$/gm)));
 
     // (['$*'] == true) 'a11\na22\na23\na24'.match(new RegExp('a..$','g'))
-       testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','g'))",
-                                           String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','g'))));
+    testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','gm'))",
+                                        String(['a11','a22','a23','a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','gm'))));
 
     // (['$*'] == true) 'abc\ndef'.match(/c$....$/)
        //testcases[count++] = new TestCase ( SECTION, "(['$*'] == true) 'abc\ndef'.match(/c$.+$/)",
index c5ccbdc..686092a 100644 (file)
@@ -60,8 +60,8 @@
 
     RegExp.multiline = true;
     // 'abc\n123xyz'.match(new RegExp('^\d+')) <multiline==true>
-       testcases[count++] = new TestCase ( SECTION, "'abc\n123xyz'.match(new RegExp('^\\d+'))",
-                                           String(['123']), String('abc\n123xyz'.match(new RegExp('^\\d+'))));
+    testcases[count++] = new TestCase ( SECTION, "'abc\n123xyz'.match(new RegExp('^\\d+','m'))",
+                                        String(['123']), String('abc\n123xyz'.match(new RegExp('^\\d+','m'))));
 
        function test()
        {
index 655d6ec..e6d588c 100644 (file)
@@ -60,8 +60,8 @@
 
     RegExp.multiline = true;
     // 'abc\n123xyz890\nxyz'.match(new RegExp('\d+$')) <multiline==true>
-       testcases[count++] = new TestCase ( SECTION, "'abc\n123xyz890\nxyz'.match(new RegExp('\\d+$'))",
-                                           String(['890']), String('abc\n123xyz890\nxyz'.match(new RegExp('\\d+$'))));
+    testcases[count++] = new TestCase ( SECTION, "'abc\n123xyz890\nxyz'.match(new RegExp('\\d+$','m'))",
+                                        String(['890']), String('abc\n123xyz890\nxyz'.match(new RegExp('\\d+$','m'))));
 
        function test()
        {