aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorRichard van Velzen <rvanvelzen1@gmail.com>2015-12-26 14:26:22 +0100
committerRichard van Velzen <rvanvelzen1@gmail.com>2015-12-26 14:26:22 +0100
commitac810dc07a6cfb2bd32cf5c8eb2f496bfe0edf3d (patch)
treef86aa5a5f37eb79bbcd506cb3ce1b7358f1b6475 /test/compress
parent9e2f9f7910fa1a51a12ce51a1711601ad6587089 (diff)
parent0cabedc52617cef9623627b390703c011ab6c0b6 (diff)
downloadtracifyjs-ac810dc07a6cfb2bd32cf5c8eb2f496bfe0edf3d.tar.gz
tracifyjs-ac810dc07a6cfb2bd32cf5c8eb2f496bfe0edf3d.zip
Merge pull request #896 from avdg/do-while-semicolon
Semicolon after do...while statement is optional
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/loops.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js
index cdf1f045..91aa1c5f 100644
--- a/test/compress/loops.js
+++ b/test/compress/loops.js
@@ -121,3 +121,27 @@ drop_if_else_break_4: {
for (; bar() && (x(), y(), foo());) baz(), z(), k();
}
}
+
+parse_do_while_with_semicolon: {
+ options = { loops: false };
+ input: {
+ do {
+ x();
+ } while (false);y()
+ }
+ expect: {
+ do x(); while (false);y();
+ }
+}
+
+parse_do_while_without_semicolon: {
+ options = { loops: false };
+ input: {
+ do {
+ x();
+ } while (false)y()
+ }
+ expect: {
+ do x(); while (false);y();
+ }
+} \ No newline at end of file