OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 23 matching lines...) Expand all Loading... |
34 "\\1 ASCII, string short"); | 34 "\\1 ASCII, string short"); |
35 assertTrue(/\u03a3((?:))\1\1x/i.test("\u03c2x"), "backref-UC16-empty"); | 35 assertTrue(/\u03a3((?:))\1\1x/i.test("\u03c2x"), "backref-UC16-empty"); |
36 assertTrue(/x(?:...|(...))\1x/i.test("x\u03a3\u03c2\u03c3x"), | 36 assertTrue(/x(?:...|(...))\1x/i.test("x\u03a3\u03c2\u03c3x"), |
37 "backref-UC16-uncaptured"); | 37 "backref-UC16-uncaptured"); |
38 assertTrue(/x(?:...|(...))\1x/i.test("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"), | 38 assertTrue(/x(?:...|(...))\1x/i.test("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"), |
39 "backref-UC16-backtrack"); | 39 "backref-UC16-backtrack"); |
40 var longUC16String = "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb"; | 40 var longUC16String = "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb"; |
41 assertEquals(longUC16String + "," + longUC16String.substring(1,4), | 41 assertEquals(longUC16String + "," + longUC16String.substring(1,4), |
42 String(/x(...)\1\1/i.exec(longUC16String)), | 42 String(/x(...)\1\1/i.exec(longUC16String)), |
43 "backref-UC16-twice"); | 43 "backref-UC16-twice"); |
| 44 |
| 45 assertFalse(/\xc1/i.test('fooA'), "quickcheck-uc16-pattern-ascii-subject"); |
| 46 assertFalse(/[\xe9]/.test('i'), "charclass-uc16-pattern-ascii-subject"); |
| 47 assertFalse(/\u5e74|\u6708/.test('t'), "alternation-uc16-pattern-ascii-subject")
; |
OLD | NEW |