From 85397da6e06fe11c40bf5cadddba302f6e57a3dc Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Mon, 8 Jun 2015 00:49:09 -0700 Subject: [PATCH] Add more sophisticated block scope test. --- test/context-coloring-test.el | 10 ++++++++++ test/fixtures/block-scopes.js | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el index ddf068084..32e4d8083 100644 --- a/test/context-coloring-test.el +++ b/test/context-coloring-test.el @@ -503,6 +503,16 @@ other non-letters are guaranteed to always be discarded." 11 111 2 222 12 222 22 + 22222 12 + 2 +}()); + +(xxxxxxxx () { + 'xxx xxxxxx'; + 11 111 2 + 222 12 + 222 22 + 22222 22 2 }());")) :before (lambda () diff --git a/test/fixtures/block-scopes.js b/test/fixtures/block-scopes.js index 735ca6f11..86e4a1368 100644 --- a/test/fixtures/block-scopes.js +++ b/test/fixtures/block-scopes.js @@ -2,5 +2,15 @@ if (1) { var a; let b; + const c; + } +}()); + +(function () { + 'use strict'; + if (1) { + var a; + let b; + const c; } }()); -- 2.39.2