aboutsummaryrefslogtreecommitdiff
path: root/test/compress/max_line_len.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-10 11:27:30 +0800
committerGitHub <noreply@github.com>2017-03-10 11:27:30 +0800
commitbe80f7e706cd6eb1c5f06e433804fda589a8968a (patch)
tree736f9545e201a14e6aaf461d7289061f6687a0a4 /test/compress/max_line_len.js
parentcf45e2f79b543ebae60c5de54166b20da4522c25 (diff)
downloadtracifyjs-be80f7e706cd6eb1c5f06e433804fda589a8968a.tar.gz
tracifyjs-be80f7e706cd6eb1c5f06e433804fda589a8968a.zip
support multi-line string in tests (#1590)
`expect_exact` sometimes have multiple lines and `\n` are hard to read. Use array of strings to emulate line breaks and improve readability.
Diffstat (limited to 'test/compress/max_line_len.js')
-rw-r--r--test/compress/max_line_len.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/compress/max_line_len.js b/test/compress/max_line_len.js
index b9e09178..7ad9ee0e 100644
--- a/test/compress/max_line_len.js
+++ b/test/compress/max_line_len.js
@@ -7,7 +7,13 @@ too_short: {
return { c: 42, d: a(), e: "foo"};
}
}
- expect_exact: 'function f(a){\nreturn{\nc:42,\nd:a(),\ne:"foo"}}'
+ expect_exact: [
+ 'function f(a){',
+ 'return{',
+ 'c:42,',
+ 'd:a(),',
+ 'e:"foo"}}',
+ ]
expect_warnings: [
"WARN: Output exceeds 10 characters"
]
@@ -22,7 +28,12 @@ just_enough: {
return { c: 42, d: a(), e: "foo"};
}
}
- expect_exact: 'function f(a){\nreturn{c:42,\nd:a(),e:"foo"}\n}'
+ expect_exact: [
+ 'function f(a){',
+ 'return{c:42,',
+ 'd:a(),e:"foo"}',
+ '}',
+ ]
expect_warnings: [
]
}