diff options
Diffstat (limited to 'Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js')
-rw-r--r-- | Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js b/Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js new file mode 100644 index 0000000..19e930d --- /dev/null +++ b/Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js @@ -0,0 +1,31 @@ +/** + * File Name: + * ECMA Section: + * Description: + * + * + * Author: christine@netscape.com + * Date: 11 August 1998 + */ + var SECTION = ""; + var VERSION = "ECMA_2"; + var TITLE = "Keywords"; + + startTest(); + + var result = "failed"; + + try { + eval("super;"); + } + catch (x) { + if (x instanceof SyntaxError) + result = x.name; + } + + AddTestCase( + "using the expression \"super\" shouldn't cause js to crash", + "SyntaxError", + result ); + + test(); |