blob: 4308d25afbe53dbb27b50e6106f536780056ed46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
`sticky` accessor function invoked on a RegExp instance
es6id: 21.2.5.12
info: |
21.2.5.12 get RegExp.prototype.sticky
4. Let flags be the value of R’s [[OriginalFlags]] internal slot.
5. If flags contains the code unit "y", return true.
6. Return false.
---*/
assert.sameValue(/./.sticky, false);
assert.sameValue(/./i.sticky, false);
assert.sameValue(/./g.sticky, false);
assert.sameValue(/./gi.sticky, false);
assert.sameValue(/./y.sticky, true);
assert.sameValue(/./iy.sticky, true);
assert.sameValue(/./yg.sticky, true);
assert.sameValue(/./iyg.sticky, true);
reportCompare(0, 0);
|