michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: /* Octal integer literal at top level. */ michael@0: assertEq(testLenientAndStrict('010', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: michael@0: /* Octal integer literal in strict function body */ michael@0: assertEq(parseRaisesException(SyntaxError) michael@0: ('function f() { "use strict"; 010; }'), michael@0: true); michael@0: michael@0: michael@0: /* michael@0: * Octal integer literal after strict function body (restoration of michael@0: * scanner state) michael@0: */ michael@0: assertEq(parsesSuccessfully('function f() { "use strict"; }; 010'), michael@0: true); michael@0: michael@0: /* Octal integer literal in function body */ michael@0: assertEq(parsesSuccessfully('function f() { 010; }'), michael@0: true); michael@0: michael@0: reportCompare(true, true);