michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: var expect = "No error"; michael@0: var actual = expect; michael@0: michael@0: if (typeof options == "function") { michael@0: var opts = options(); michael@0: if (!/\bstrict\b/.test(opts)) michael@0: options("strict"); michael@0: if (!/\bwerror\b/.test(opts)) michael@0: options("werror"); michael@0: } michael@0: michael@0: try { michael@0: eval('function foo() { "use strict"; }'); michael@0: } catch (e) { michael@0: actual = '' + e; michael@0: } michael@0: michael@0: reportCompare(expect, actual, "ok");