From 48284844a461e6113bb9911cdcdad7ab8a3d85de Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Tue, 17 Jan 2017 17:33:40 +0800 Subject: add missing LHS cases which global_defs should avoid --- test/compress/issue-208.js | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/compress/issue-208.js b/test/compress/issue-208.js index 14752b8a..2f103786 100644 --- a/test/compress/issue-208.js +++ b/test/compress/issue-208.js @@ -1,11 +1,29 @@ do_not_update_lhs: { - options = { global_defs: { DEBUG: false } }; - input: { DEBUG = false; } - expect: { DEBUG = false; } + options = { + global_defs: { DEBUG: 0 } + } + input: { + DEBUG++; + DEBUG += 1; + DEBUG = 1; + } + expect: { + DEBUG++; + DEBUG += 1; + DEBUG = 1; + } } do_update_rhs: { - options = { global_defs: { DEBUG: false } }; - input: { MY_DEBUG = DEBUG; } - expect: { MY_DEBUG = false; } + options = { + global_defs: { DEBUG: 0 } + } + input: { + MY_DEBUG = DEBUG; + MY_DEBUG += DEBUG; + } + expect: { + MY_DEBUG = 0; + MY_DEBUG += 0; + } } -- cgit v1.2.3