summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/RegExp/split-prop-access.js
blob: 73c5bebb31e4255120ad3322a88dbefc5ec06988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var BUGNUMBER = 1287525;
var summary = 'String.prototype.split should call ToUint32(limit) before ToString(separator).';

print(BUGNUMBER + ": " + summary);

var accessed = false;

var rx = /a/;
Object.defineProperty(rx, Symbol.match, {
  get() {
    accessed = true;
  }
});
rx[Symbol.split]("abba");

assertEq(accessed, true);

if (typeof reportCompare === "function")
  reportCompare(true, true);