summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js')
-rw-r--r--js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js b/js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js
new file mode 100644
index 0000000000..ab075537dd
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js
@@ -0,0 +1,21 @@
+// Copyright 2019 Ron Buckton. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: The "indices" property is an Array.
+esid: sec-regexpbuiltinexec
+features: [regexp-match-indices]
+info: |
+ RegExpBuiltinExec ( R, S )
+
+ 8. If _flags_ contains `"d"`, let _hasIndices_ be *true*, else let _hasIndices_ be *false*.
+ 36. If _hasIndices_ is *true*, then
+ b. Perform ! CreateDataProperty(_A_, `"indices"`, _indicesArray_).
+---*/
+
+let match = /a/.exec("a");
+
+// `indices` is not defined by default
+assert(!match.hasOwnProperty("indices"));
+
+reportCompare(0, 0);