aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-04-24 15:19:45 +0800
committerGitHub <noreply@github.com>2018-04-24 15:19:45 +0800
commitb5ce1997112007d772e23bb04e09ed425bff608a (patch)
tree78c201fd26ad77280b836bfb1f57d7d6bf74ee87 /test/compress
parentc71ed91e63d07c85b453ad56e1f60842c23c5526 (diff)
downloadtracifyjs-b5ce1997112007d772e23bb04e09ed425bff608a.tar.gz
tracifyjs-b5ce1997112007d772e23bb04e09ed425bff608a.zip
improve `max_line_len` (#3095)
fixes #304
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/max_line_len.js34
1 files changed, 24 insertions, 10 deletions
diff --git a/test/compress/max_line_len.js b/test/compress/max_line_len.js
index 7ad9ee0e..5be4e059 100644
--- a/test/compress/max_line_len.js
+++ b/test/compress/max_line_len.js
@@ -8,14 +8,14 @@ too_short: {
}
}
expect_exact: [
- 'function f(a){',
- 'return{',
- 'c:42,',
- 'd:a(),',
- 'e:"foo"}}',
+ "function f(",
+ "a){return{",
+ "c:42,d:a(",
+ '),e:"foo"}',
+ "}",
]
expect_warnings: [
- "WARN: Output exceeds 10 characters"
+ "WARN: Output exceeds 10 characters",
]
}
@@ -29,11 +29,25 @@ just_enough: {
}
}
expect_exact: [
- 'function f(a){',
- 'return{c:42,',
+ "function f(a){",
+ "return{c:42,",
'd:a(),e:"foo"}',
- '}',
+ "}",
]
- expect_warnings: [
+ expect_warnings: []
+}
+
+issue_304: {
+ beautify = {
+ max_line_len: 10,
+ }
+ input: {
+ var a = 0, b = 0, c = 0, d = 0, e = 0;
+ }
+ expect_exact: [
+ "var a=0,",
+ "b=0,c=0,",
+ "d=0,e=0;",
]
+ expect_warnings: []
}