Skip to content

Commit

Permalink
Update RegExp Unicode property escape tests per Unicode 11
Browse files Browse the repository at this point in the history
Emoji data is now published as part of the Unicode standard itself, and thus follows the same version number.

Ref. mathiasbynens/unicode-property-escapes-tests@f302c60.
Ref. tc39/ecma262#1218.
Ref. tc39/ecma262#1219.
  • Loading branch information
mathiasbynens committed Jun 7, 2018
1 parent 11f476c commit 85d595e
Show file tree
Hide file tree
Showing 388 changed files with 3,721 additions and 2,195 deletions.
7 changes: 6 additions & 1 deletion test/built-ins/RegExp/property-escapes/character-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ features: [regexp-unicode-property-escapes]
---*/

/[\p{Hex}]/u;
assert.throws.early(SyntaxError, "/[\\p{Hex}-\\uFFFF]/u");
assert.throws(
SyntaxError,
() => /[\p{Hex}-\uFFFF]/u,
// See step 1 of https://tc39.github.io/ecma262/#sec-runtime-semantics-characterrange-abstract-operation.
'property escape at start of character class range should throw if it expands to multiple characters'
);
assert.throws.early(SyntaxError, "/[\\p{}]/u");
assert.throws.early(SyntaxError, "/[\\p{invalid}]/u");
assert.throws.early(SyntaxError, "/[\\p{]/u");
Expand Down
5 changes: 2 additions & 3 deletions test/built-ins/RegExp/property-escapes/generated/ASCII.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Mathias Bynens. All rights reserved.
// Copyright 2018 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
Expand All @@ -7,8 +7,7 @@ description: >
Unicode property escapes for `ASCII`
info: |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
Unicode v10.0.0
Emoji v5.0 (UTR51)
Unicode v11.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Mathias Bynens. All rights reserved.
// Copyright 2018 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
Expand All @@ -7,8 +7,7 @@ description: >
Unicode property escapes for `ASCII_Hex_Digit`
info: |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
Unicode v10.0.0
Emoji v5.0 (UTR51)
Unicode v11.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
Expand Down
97 changes: 64 additions & 33 deletions test/built-ins/RegExp/property-escapes/generated/Alphabetic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Mathias Bynens. All rights reserved.
// Copyright 2018 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
Expand All @@ -7,8 +7,7 @@ description: >
Unicode property escapes for `Alphabetic`
info: |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
Unicode v10.0.0
Emoji v5.0 (UTR51)
Unicode v11.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
Expand Down Expand Up @@ -83,14 +82,14 @@ const matchSymbols = buildString({
0x002E2F,
0x00A8C5,
0x00A8FB,
0x00A8FD,
0x00A9CF,
0x00AA7A,
0x00AAC0,
0x00AAC2,
0x00FB3E,
0x010808,
0x01083C,
0x010F27,
0x011176,
0x0111DA,
0x0111DC,
Expand All @@ -103,9 +102,11 @@ const matchSymbols = buildString({
0x011640,
0x011644,
0x0118FF,
0x011A9D,
0x011C40,
0x011D3A,
0x011D43,
0x011D98,
0x01BC9E,
0x01D4A2,
0x01D4BB,
Expand Down Expand Up @@ -145,12 +146,12 @@ const matchSymbols = buildString({
[0x0003F7, 0x000481],
[0x00048A, 0x00052F],
[0x000531, 0x000556],
[0x000561, 0x000587],
[0x000560, 0x000588],
[0x0005B0, 0x0005BD],
[0x0005C1, 0x0005C2],
[0x0005C4, 0x0005C5],
[0x0005D0, 0x0005EA],
[0x0005F0, 0x0005F2],
[0x0005EF, 0x0005F2],
[0x000610, 0x00061A],
[0x000620, 0x000657],
[0x000659, 0x00065F],
Expand Down Expand Up @@ -334,7 +335,7 @@ const matchSymbols = buildString({
[0x001772, 0x001773],
[0x001780, 0x0017B3],
[0x0017B6, 0x0017C8],
[0x001820, 0x001877],
[0x001820, 0x001878],
[0x001880, 0x0018AA],
[0x0018B0, 0x0018F5],
[0x001900, 0x00191E],
Expand All @@ -358,6 +359,8 @@ const matchSymbols = buildString({
[0x001C4D, 0x001C4F],
[0x001C5A, 0x001C7D],
[0x001C80, 0x001C88],
[0x001C90, 0x001CBA],
[0x001CBD, 0x001CBF],
[0x001CE9, 0x001CEC],
[0x001CEE, 0x001CF3],
[0x001CF5, 0x001CF6],
Expand Down Expand Up @@ -412,12 +415,12 @@ const matchSymbols = buildString({
[0x00309D, 0x00309F],
[0x0030A1, 0x0030FA],
[0x0030FC, 0x0030FF],
[0x003105, 0x00312E],
[0x003105, 0x00312F],
[0x003131, 0x00318E],
[0x0031A0, 0x0031BA],
[0x0031F0, 0x0031FF],
[0x003400, 0x004DB5],
[0x004E00, 0x009FEA],
[0x004E00, 0x009FEF],
[0x00A000, 0x00A48C],
[0x00A4D0, 0x00A4FD],
[0x00A500, 0x00A60C],
Expand All @@ -428,15 +431,15 @@ const matchSymbols = buildString({
[0x00A67F, 0x00A6EF],
[0x00A717, 0x00A71F],
[0x00A722, 0x00A788],
[0x00A78B, 0x00A7AE],
[0x00A7B0, 0x00A7B7],
[0x00A78B, 0x00A7B9],
[0x00A7F7, 0x00A801],
[0x00A803, 0x00A805],
[0x00A807, 0x00A80A],
[0x00A80C, 0x00A827],
[0x00A840, 0x00A873],
[0x00A880, 0x00A8C3],
[0x00A8F2, 0x00A8F7],
[0x00A8FD, 0x00A8FE],
[0x00A90A, 0x00A92A],
[0x00A930, 0x00A952],
[0x00A960, 0x00A97C],
Expand Down Expand Up @@ -527,7 +530,7 @@ const matchSymbols = buildString({
[0x010A05, 0x010A06],
[0x010A0C, 0x010A13],
[0x010A15, 0x010A17],
[0x010A19, 0x010A33],
[0x010A19, 0x010A35],
[0x010A60, 0x010A7C],
[0x010A80, 0x010A9C],
[0x010AC0, 0x010AC7],
Expand All @@ -539,10 +542,14 @@ const matchSymbols = buildString({
[0x010C00, 0x010C48],
[0x010C80, 0x010CB2],
[0x010CC0, 0x010CF2],
[0x010D00, 0x010D27],
[0x010F00, 0x010F1C],
[0x010F30, 0x010F45],
[0x011000, 0x011045],
[0x011082, 0x0110B8],
[0x0110D0, 0x0110E8],
[0x011100, 0x011132],
[0x011144, 0x011146],
[0x011150, 0x011172],
[0x011180, 0x0111BF],
[0x0111C1, 0x0111C4],
Expand Down Expand Up @@ -574,8 +581,9 @@ const matchSymbols = buildString({
[0x0115D8, 0x0115DD],
[0x011600, 0x01163E],
[0x011680, 0x0116B5],
[0x011700, 0x011719],
[0x011700, 0x01171A],
[0x01171D, 0x01172A],
[0x011800, 0x011838],
[0x0118A0, 0x0118DF],
[0x011A00, 0x011A32],
[0x011A35, 0x011A3E],
Expand All @@ -594,6 +602,12 @@ const matchSymbols = buildString({
[0x011D3C, 0x011D3D],
[0x011D3F, 0x011D41],
[0x011D46, 0x011D47],
[0x011D60, 0x011D65],
[0x011D67, 0x011D68],
[0x011D6A, 0x011D8E],
[0x011D90, 0x011D91],
[0x011D93, 0x011D96],
[0x011EE0, 0x011EF6],
[0x012000, 0x012399],
[0x012400, 0x01246E],
[0x012480, 0x012543],
Expand All @@ -606,11 +620,12 @@ const matchSymbols = buildString({
[0x016B40, 0x016B43],
[0x016B63, 0x016B77],
[0x016B7D, 0x016B8F],
[0x016E40, 0x016E7F],
[0x016F00, 0x016F44],
[0x016F50, 0x016F7E],
[0x016F93, 0x016F9F],
[0x016FE0, 0x016FE1],
[0x017000, 0x0187EC],
[0x017000, 0x0187F1],
[0x018800, 0x018AF2],
[0x01B000, 0x01B11E],
[0x01B170, 0x01B2FB],
Expand Down Expand Up @@ -827,7 +842,7 @@ const nonMatchSymbols = buildString({
0x002DDF,
0x0030A0,
0x0030FB,
0x00A7AF,
0x003130,
0x00A802,
0x00A806,
0x00A80B,
Expand Down Expand Up @@ -884,6 +899,11 @@ const nonMatchSymbols = buildString({
0x011D3B,
0x011D3E,
0x011D42,
0x011D66,
0x011D69,
0x011D8F,
0x011D92,
0x011D97,
0x01D455,
0x01D49D,
0x01D4AD,
Expand Down Expand Up @@ -954,10 +974,10 @@ const nonMatchSymbols = buildString({
[0x000380, 0x000385],
[0x000482, 0x000489],
[0x000557, 0x000558],
[0x00055A, 0x000560],
[0x000588, 0x0005AF],
[0x00055A, 0x00055F],
[0x000589, 0x0005AF],
[0x0005C8, 0x0005CF],
[0x0005EB, 0x0005EF],
[0x0005EB, 0x0005EE],
[0x0005F3, 0x00060F],
[0x00061B, 0x00061F],
[0x000660, 0x00066D],
Expand Down Expand Up @@ -1090,7 +1110,7 @@ const nonMatchSymbols = buildString({
[0x0017C9, 0x0017D6],
[0x0017D8, 0x0017DB],
[0x0017DD, 0x00181F],
[0x001878, 0x00187F],
[0x001879, 0x00187F],
[0x0018AB, 0x0018AF],
[0x0018F6, 0x0018FF],
[0x00192C, 0x00192F],
Expand All @@ -1110,7 +1130,9 @@ const nonMatchSymbols = buildString({
[0x001C36, 0x001C4C],
[0x001C50, 0x001C59],
[0x001C7E, 0x001C7F],
[0x001C89, 0x001CE8],
[0x001C89, 0x001C8F],
[0x001CBB, 0x001CBC],
[0x001CC0, 0x001CE8],
[0x001CF7, 0x001CFF],
[0x001DC0, 0x001DE6],
[0x001DF5, 0x001DFF],
Expand Down Expand Up @@ -1154,12 +1176,11 @@ const nonMatchSymbols = buildString({
[0x00303D, 0x003040],
[0x003097, 0x00309C],
[0x003100, 0x003104],
[0x00312F, 0x003130],
[0x00318F, 0x00319F],
[0x0031BB, 0x0031EF],
[0x003200, 0x0033FF],
[0x004DB6, 0x004DFF],
[0x009FEB, 0x009FFF],
[0x009FF0, 0x009FFF],
[0x00A48D, 0x00A4CF],
[0x00A4FE, 0x00A4FF],
[0x00A60D, 0x00A60F],
Expand All @@ -1170,12 +1191,12 @@ const nonMatchSymbols = buildString({
[0x00A6F0, 0x00A716],
[0x00A720, 0x00A721],
[0x00A789, 0x00A78A],
[0x00A7B8, 0x00A7F6],
[0x00A7BA, 0x00A7F6],
[0x00A828, 0x00A83F],
[0x00A874, 0x00A87F],
[0x00A8C6, 0x00A8F1],
[0x00A8F8, 0x00A8FA],
[0x00A8FE, 0x00A909],
[0x00A8FF, 0x00A909],
[0x00A92B, 0x00A92F],
[0x00A953, 0x00A95F],
[0x00A97D, 0x00A97F],
Expand Down Expand Up @@ -1248,7 +1269,7 @@ const nonMatchSymbols = buildString({
[0x0109B8, 0x0109BD],
[0x0109C0, 0x0109FF],
[0x010A07, 0x010A0B],
[0x010A34, 0x010A5F],
[0x010A36, 0x010A5F],
[0x010A7D, 0x010A7F],
[0x010A9D, 0x010ABF],
[0x010AE5, 0x010AFF],
Expand All @@ -1258,11 +1279,16 @@ const nonMatchSymbols = buildString({
[0x010B92, 0x010BFF],
[0x010C49, 0x010C7F],
[0x010CB3, 0x010CBF],
[0x010CF3, 0x010FFF],
[0x010CF3, 0x010CFF],
[0x010D28, 0x010EFF],
[0x010F1D, 0x010F26],
[0x010F28, 0x010F2F],
[0x010F46, 0x010FFF],
[0x011046, 0x011081],
[0x0110B9, 0x0110CF],
[0x0110E9, 0x0110FF],
[0x011133, 0x01114F],
[0x011133, 0x011143],
[0x011147, 0x01114F],
[0x011173, 0x011175],
[0x011177, 0x01117F],
[0x0111C5, 0x0111D9],
Expand Down Expand Up @@ -1290,21 +1316,25 @@ const nonMatchSymbols = buildString({
[0x011641, 0x011643],
[0x011645, 0x01167F],
[0x0116B6, 0x0116FF],
[0x01171A, 0x01171C],
[0x01172B, 0x01189F],
[0x01171B, 0x01171C],
[0x01172B, 0x0117FF],
[0x011839, 0x01189F],
[0x0118E0, 0x0118FE],
[0x011900, 0x0119FF],
[0x011A33, 0x011A34],
[0x011A3F, 0x011A4F],
[0x011A84, 0x011A85],
[0x011A98, 0x011ABF],
[0x011A98, 0x011A9C],
[0x011A9E, 0x011ABF],
[0x011AF9, 0x011BFF],
[0x011C41, 0x011C71],
[0x011C90, 0x011C91],
[0x011CB7, 0x011CFF],
[0x011D37, 0x011D39],
[0x011D44, 0x011D45],
[0x011D48, 0x011FFF],
[0x011D48, 0x011D5F],
[0x011D99, 0x011EDF],
[0x011EF7, 0x011FFF],
[0x01239A, 0x0123FF],
[0x01246F, 0x01247F],
[0x012544, 0x012FFF],
Expand All @@ -1316,12 +1346,13 @@ const nonMatchSymbols = buildString({
[0x016B37, 0x016B3F],
[0x016B44, 0x016B62],
[0x016B78, 0x016B7C],
[0x016B90, 0x016EFF],
[0x016B90, 0x016E3F],
[0x016E80, 0x016EFF],
[0x016F45, 0x016F4F],
[0x016F7F, 0x016F92],
[0x016FA0, 0x016FDF],
[0x016FE2, 0x016FFF],
[0x0187ED, 0x0187FF],
[0x0187F2, 0x0187FF],
[0x018AF3, 0x01AFFF],
[0x01B11F, 0x01B16F],
[0x01B2FC, 0x01BBFF],
Expand Down
5 changes: 2 additions & 3 deletions test/built-ins/RegExp/property-escapes/generated/Any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Mathias Bynens. All rights reserved.
// Copyright 2018 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
Expand All @@ -7,8 +7,7 @@ description: >
Unicode property escapes for `Any`
info: |
Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
Unicode v10.0.0
Emoji v5.0 (UTR51)
Unicode v11.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
Expand Down
Loading

0 comments on commit 85d595e

Please sign in to comment.