mirror of https://github.com/tc39/test262.git
121 lines
6.6 KiB
JSON
121 lines
6.6 KiB
JSON
{
|
|
"testCollection": {
|
|
"name": "7.8.4",
|
|
"numTests": 14,
|
|
"tests": [
|
|
{
|
|
"id": "7.8.4-1-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-1-s.js",
|
|
"description": "A directive preceeding an 'use strict' directive may not contain an OctalEscapeSequence",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval(' \"asterisk: \\\\052\" /* octal escape sequences forbidden in strict mode*/ ; \"use strict\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-10-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-10-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \" \\\\10 \";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-2-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-2-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-3-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-3-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"a\\\\4\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-30-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-30-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\' + '1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-31-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-31-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\\" + \"1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-32-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-32-s.js",
|
|
"description": "Two OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\\\\1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-33-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-33-s.js",
|
|
"description": "Three OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\\\\2\\\\7\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-4-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-4-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"z\\\\7\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-5-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-5-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\00a\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-6-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-6-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\01z\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-7-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-7-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"a\\\\03z\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-8-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-8-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \" \\\\06\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"id": "7.8.4-9-s",
|
|
"path": "TestCases/chapter07/7.8/7.8.4/7.8.4-9-s.js",
|
|
"description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
|
|
"test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\07 \";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
|
|
"precondition": "(fnSupportsStrict())",
|
|
"strict_only": ""
|
|
}
|
|
]
|
|
}
|
|
}
|