Index: test/mjsunit/regress/regress-5566.js |
diff --git a/test/mjsunit/regress/regress-5566.js b/test/mjsunit/regress/regress-5566.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..228dfc1d0f4c5b38beb570d7aac1825750206961 |
--- /dev/null |
+++ b/test/mjsunit/regress/regress-5566.js |
@@ -0,0 +1,21 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// https://github.com/tc39/proposal-regexp-legacy-features#additional-properties-of-the-regexp-constructor |
+ |
+const props = [ "input", "$_" |
+ , "lastMatch", "$&" |
+ , "lastParen", "$+" |
+ , "leftContext", "$`" |
+ , "rightContext", "$'" |
+ , "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9" |
+ ]; |
+ |
+for (let i = 0; i < props.length; i++) { |
+ const prop = props[i]; |
+ const desc = Object.getOwnPropertyDescriptor(RegExp, prop); |
+ assertTrue(desc.configurable, prop); |
+ assertFalse(desc.enumerable, prop); |
+ assertTrue(desc.get !== undefined, prop); |
Dan Ehrenberg
2016/10/26 11:14:27
Since we left it this way on purpose, how about de
jgruber
2016/10/27 07:48:15
Done.
|
+} |