mirror of
https://github.com/tc39/test262.git
synced 2025-08-29 05:48:28 +02:00
28 lines
740 B
JavaScript
28 lines
740 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/**
|
|
* The RegExp instance ignoreCase property has the attribute ReadOnly
|
|
*
|
|
* @path ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js
|
|
* @description Checking if varying the ignoreCase property fails
|
|
*/
|
|
|
|
__re = /a|b|c/;
|
|
|
|
//CHECK#1
|
|
if (__re.hasOwnProperty('ignoreCase') !== true) {
|
|
$FAIL('#1: __re = /a|b|c/; __re.hasOwnProperty(\'ignoreCase\') === true');
|
|
}
|
|
|
|
__obj = __re.ignoreCase;
|
|
|
|
__re.ignoreCase = "shifted";
|
|
|
|
//CHECK#2
|
|
if (__re.ignoreCase !== __obj) {
|
|
$ERROR('#2: __re = /a|b|c/; __obj = __re.ignoreCase; __re.ignoreCase = "shifted"; __re.ignoreCase === __obj. Actual: ' + (__re.ignoreCase));
|
|
}
|
|
|
|
|