summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/RegExp/match-indices/no-indices-array.js
blob: ab075537ddf93e4197d73b04b01c33d6fbad5166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);