michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: * File Name: michael@0: * ECMA Section: michael@0: * Description: michael@0: * michael@0: * michael@0: * Author: christine@netscape.com michael@0: * Date: 11 August 1998 michael@0: */ michael@0: var SECTION = ""; michael@0: var VERSION = "ECMA_2"; michael@0: var TITLE = "Keywords"; michael@0: michael@0: startTest(); michael@0: michael@0: print("This test requires option javascript.options.strict enabled"); michael@0: michael@0: if (!options().match(/strict/)) michael@0: { michael@0: options('strict'); michael@0: } michael@0: if (!options().match(/werror/)) michael@0: { michael@0: options('werror'); michael@0: } michael@0: michael@0: var result = "failed"; michael@0: michael@0: try { michael@0: eval("super;"); michael@0: } michael@0: catch (x) { michael@0: if (x instanceof SyntaxError) michael@0: result = x.name; michael@0: } michael@0: michael@0: AddTestCase( michael@0: "using the expression \"super\" shouldn't cause js to crash", michael@0: "SyntaxError", michael@0: result ); michael@0: michael@0: test();