diff options
author | alexlamsl <alexlamsl@gmail.com> | 2017-01-17 17:33:40 +0800 |
---|---|---|
committer | Richard van Velzen <rvanvelzen1@gmail.com> | 2017-01-19 21:06:28 +0100 |
commit | 48284844a461e6113bb9911cdcdad7ab8a3d85de (patch) | |
tree | 05c5d8ff7f2a312a8880c143dbfcdf35abe11dd5 /test | |
parent | ec2e5fa3a2e5cf421aebd94b93c668b18e540c69 (diff) | |
download | tracifyjs-48284844a461e6113bb9911cdcdad7ab8a3d85de.tar.gz tracifyjs-48284844a461e6113bb9911cdcdad7ab8a3d85de.zip |
add missing LHS cases which global_defs should avoid
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/issue-208.js | 30 |
1 files changed, 24 insertions, 6 deletions
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; + } } |