diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/match-indices/indices-array-unicode-property-names.js')
-rw-r--r-- | js/src/tests/test262/built-ins/RegExp/match-indices/indices-array-unicode-property-names.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/match-indices/indices-array-unicode-property-names.js b/js/src/tests/test262/built-ins/RegExp/match-indices/indices-array-unicode-property-names.js new file mode 100644 index 0000000000..8eba7355d8 --- /dev/null +++ b/js/src/tests/test262/built-ins/RegExp/match-indices/indices-array-unicode-property-names.js @@ -0,0 +1,22 @@ +// Copyright 2019 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Basic matching cases with non-unicode matches. +includes: [compareArray.js] +esid: sec-makeindicesarray +features: [regexp-named-groups, regexp-match-indices] +---*/ + +assert.compareArray([1, 2], /(?<π>a)/du.exec("bab").indices.groups.π); +assert.compareArray([1, 2], /(?<\u{03C0}>a)/du.exec("bab").indices.groups.π); +assert.compareArray([1, 2], /(?<π>a)/du.exec("bab").indices.groups.\u03C0); +assert.compareArray([1, 2], /(?<\u{03C0}>a)/du.exec("bab").indices.groups.\u03C0); +assert.compareArray([1, 2], /(?<$>a)/du.exec("bab").indices.groups.$); +assert.compareArray([1, 2], /(?<_>a)/du.exec("bab").indices.groups._); +assert.compareArray([1, 2], /(?<$𐒤>a)/du.exec("bab").indices.groups.$𐒤); +assert.compareArray([1, 2], /(?<_\u200C>a)/du.exec("bab").indices.groups._\u200C); +assert.compareArray([1, 2], /(?<_\u200D>a)/du.exec("bab").indices.groups._\u200D); +assert.compareArray([1, 2], /(?<ಠ_ಠ>a)/du.exec("bab").indices.groups.ಠ_ಠ); + +reportCompare(0, 0); |