aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/templates.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/templates.js b/test/compress/templates.js
index bac1f061..3df3efb7 100644
--- a/test/compress/templates.js
+++ b/test/compress/templates.js
@@ -398,3 +398,24 @@ issue_4676: {
expect_stdout: "PASS"
node_version: ">=4"
}
+
+issue_4931: {
+ options = {
+ evaluate: true,
+ templates: true,
+ unsafe: true,
+ }
+ input: {
+ console.log(String.raw`${typeof A} ${"\r"}`);
+ console.log(String.raw`${"\\"} ${"`"}`);
+ }
+ expect: {
+ console.log(String.raw`${typeof A} ${"\r"}`);
+ console.log("\\ `");
+ }
+ expect_stdout: [
+ "undefined \r",
+ "\\ `",
+ ]
+ node_version: ">=4"
+}