sundar@71: /* sundar@71: * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. sundar@71: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. attila@962: * sundar@71: * This code is free software; you can redistribute it and/or modify it sundar@71: * under the terms of the GNU General Public License version 2 only, as sundar@71: * published by the Free Software Foundation. attila@962: * sundar@71: * This code is distributed in the hope that it will be useful, but WITHOUT sundar@71: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or sundar@71: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License sundar@71: * version 2 for more details (a copy is included in the LICENSE file that sundar@71: * accompanied this code). attila@962: * sundar@71: * You should have received a copy of the GNU General Public License version sundar@71: * 2 along with this work; if not, write to the Free Software Foundation, sundar@71: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. attila@962: * sundar@71: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA sundar@71: * or visit www.oracle.com if you need additional information or have any sundar@71: * questions. sundar@71: */ sundar@71: sundar@70: /** sundar@70: * JDK-8007522: IllegalStateException thrown from String.prototype.search function sundar@70: * sundar@70: * @test sundar@70: * @run sundar@70: */ sundar@70: sundar@70: var str = "hello"; sundar@70: // search used to result in IllegalStateException sundar@70: if (str.search(/foo/g) != -1) { sundar@70: fail("String.prototype.search failed"); sundar@70: } sundar@70: