Index: test/webkit/regexp-compile-crash.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/regexp-compile-crash.js |
similarity index 84% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/regexp-compile-crash.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..87abbcb5e483eccca7fffc5196bfd3e5e5951a87 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/regexp-compile-crash.js |
@@ -21,11 +21,13 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-description( |
-"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating." |
-); |
- |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+description("Test regexp compiling to make sure it doens't crash like bug 16127"); |
+shouldBeTrue('!!/\\)[;\s]+/'); |
+shouldThrow('/[/'); |
+shouldThrow('/[a/'); |
+shouldThrow('/[-/'); |
+shouldBeTrue('!!/(a)\1/'); |
+shouldBeTrue('!!/(a)\1{1,3}/'); |
+testPassed("No crashes, yay!") |