From a8cebe32627802814eaee0a935e9c0d46dc617a6 Mon Sep 17 00:00:00 2001 From: Anton Kovalyov Date: Sat, 26 Nov 2011 21:07:11 -0800 Subject: [PATCH] Added regression test for GH-353; closes GH-353 --- tests/fixtures/undefstrict.js | 6 ++++++ tests/options.js | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 tests/fixtures/undefstrict.js diff --git a/tests/fixtures/undefstrict.js b/tests/fixtures/undefstrict.js new file mode 100644 index 0000000000..472b1595fa --- /dev/null +++ b/tests/fixtures/undefstrict.js @@ -0,0 +1,6 @@ +function b() { + "use strict"; + a(); +} + +function a() { } \ No newline at end of file diff --git a/tests/options.js b/tests/options.js index a3b13ac45a..59d228b22b 100644 --- a/tests/options.js +++ b/tests/options.js @@ -113,6 +113,11 @@ exports.latedefwundef = function () { .test(src, { latedef: true, undef: true }); }; +exports.undefwstrict = function () { + var src = fs.readFileSync(__dirname + '/fixtures/undefstrict.js', 'utf8'); + TestRun().test(src, { undef: false }); +}; + /** * The `proto` and `iterator` options allow you to prohibit the use of the * special `__proto__` and `__iterator__` properties, respectively.