diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-02-24 07:33:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-24 07:33:57 +0800 |
commit | 229e42cdee14c384b7a48bd0882bb27d98db040a (patch) | |
tree | aefc78b2d7dded10d049296336324933596d770d /test/input | |
parent | eb55d8a9bb37cc28303ace91337784dbf0777d03 (diff) | |
parent | 4e49302916fe395f5c63992aa28c33392208fb27 (diff) | |
download | tracifyjs-229e42cdee14c384b7a48bd0882bb27d98db040a.tar.gz tracifyjs-229e42cdee14c384b7a48bd0882bb27d98db040a.zip |
Merge pull request #1485 from alexlamsl/merge-2.8.0
2.8.0 staging
Diffstat (limited to 'test/input')
-rw-r--r-- | test/input/global_defs/nested.js | 1 | ||||
-rw-r--r-- | test/input/global_defs/simple.js | 1 | ||||
-rw-r--r-- | test/input/issue-1482/bracketize.js | 73 | ||||
-rw-r--r-- | test/input/issue-1482/default.js | 17 | ||||
-rw-r--r-- | test/input/issue-1482/input.js | 12 |
5 files changed, 104 insertions, 0 deletions
diff --git a/test/input/global_defs/nested.js b/test/input/global_defs/nested.js new file mode 100644 index 00000000..dbf57909 --- /dev/null +++ b/test/input/global_defs/nested.js @@ -0,0 +1 @@ +console.log(C.V, C.D); diff --git a/test/input/global_defs/simple.js b/test/input/global_defs/simple.js new file mode 100644 index 00000000..44d515e3 --- /dev/null +++ b/test/input/global_defs/simple.js @@ -0,0 +1 @@ +console.log(D); diff --git a/test/input/issue-1482/bracketize.js b/test/input/issue-1482/bracketize.js new file mode 100644 index 00000000..2c2b103c --- /dev/null +++ b/test/input/issue-1482/bracketize.js @@ -0,0 +1,73 @@ +if (x) { + foo(); +} + +if (x) { + foo(); +} else { + baz(); +} + +if (x) { + foo(); +} else if (y) { + bar(); +} else { + baz(); +} + +if (x) { + if (y) { + foo(); + } else { + bar(); + } +} else { + baz(); +} + +if (x) { + foo(); +} else if (y) { + bar(); +} else if (z) { + baz(); +} else { + moo(); +} + +function f() { + if (x) { + foo(); + } + if (x) { + foo(); + } else { + baz(); + } + if (x) { + foo(); + } else if (y) { + bar(); + } else { + baz(); + } + if (x) { + if (y) { + foo(); + } else { + bar(); + } + } else { + baz(); + } + if (x) { + foo(); + } else if (y) { + bar(); + } else if (z) { + baz(); + } else { + moo(); + } +} diff --git a/test/input/issue-1482/default.js b/test/input/issue-1482/default.js new file mode 100644 index 00000000..14054e98 --- /dev/null +++ b/test/input/issue-1482/default.js @@ -0,0 +1,17 @@ +if (x) foo(); + +if (x) foo(); else baz(); + +if (x) foo(); else if (y) bar(); else baz(); + +if (x) if (y) foo(); else bar(); else baz(); + +if (x) foo(); else if (y) bar(); else if (z) baz(); else moo(); + +function f() { + if (x) foo(); + if (x) foo(); else baz(); + if (x) foo(); else if (y) bar(); else baz(); + if (x) if (y) foo(); else bar(); else baz(); + if (x) foo(); else if (y) bar(); else if (z) baz(); else moo(); +} diff --git a/test/input/issue-1482/input.js b/test/input/issue-1482/input.js new file mode 100644 index 00000000..0186e82c --- /dev/null +++ b/test/input/issue-1482/input.js @@ -0,0 +1,12 @@ +if (x) foo(); +if (x) foo(); else baz(); +if (x) foo(); else if (y) bar(); else baz(); +if (x) if (y) foo(); else bar(); else baz(); +if (x) foo(); else if (y) bar(); else if (z) baz(); else moo(); +function f() { +if (x) foo(); +if (x) foo(); else baz(); +if (x) foo(); else if (y) bar(); else baz(); +if (x) if (y) foo(); else bar(); else baz(); +if (x) foo(); else if (y) bar(); else if (z) baz(); else moo(); +} |