| Index: test/mjsunit/regress/regress-1217.js
|
| diff --git a/test/mjsunit/bugs/bug-1217.js b/test/mjsunit/regress/regress-1217.js
|
| similarity index 68%
|
| rename from test/mjsunit/bugs/bug-1217.js
|
| rename to test/mjsunit/regress/regress-1217.js
|
| index e6a03a457b7942d8eb2302aee6f061dc6089ac5a..65305498645644acd5118309e5b8b29aff4136b2 100644
|
| --- a/test/mjsunit/bugs/bug-1217.js
|
| +++ b/test/mjsunit/regress/regress-1217.js
|
| @@ -25,8 +25,26 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Check conformity to ECMA-262 15.10.6.
|
| -// The class of RegExp's prototype is RegExp.
|
| +// Check that RegExp.prototype is itself a RegExp object.
|
|
|
| -var prototype_class = ({}).toString.call(RegExp.prototype);
|
| -assertEquals("[object RegExp]", prototype_class);
|
| +var proto = RegExp.prototype;
|
| +assertEquals("[object RegExp]", Object.prototype.toString.call(proto));
|
| +
|
| +assertEquals("", proto.source);
|
| +assertEquals(false, proto.global);
|
| +assertEquals(false, proto.multiline);
|
| +assertEquals(false, proto.ignoreCase);
|
| +assertEquals(0, proto.lastIndex);
|
| +
|
| +assertEquals("/(?:)/", proto.toString());
|
| +
|
| +var execResult = proto.exec("argle");
|
| +assertEquals(1, execResult.length);
|
| +assertEquals("", execResult[0]);
|
| +assertEquals("argle", execResult.input);
|
| +assertEquals(0, execResult.index);
|
| +
|
| +assertTrue(proto.test("argle"));
|
| +
|
| +// We disallow re-compiling the RegExp.prototype object.
|
| +assertThrows(function(){ proto.compile("something"); }, TypeError);
|
|
|