From 7110c6923b8ef82f295f5d9ff9d42d2f88432810 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 1 Feb 2021 18:29:43 +0000 Subject: fix corner case in `templates` (#4607) fixes #4606 --- test/compress/templates.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/compress/templates.js') diff --git a/test/compress/templates.js b/test/compress/templates.js index 3b0e983c..3c7957f8 100644 --- a/test/compress/templates.js +++ b/test/compress/templates.js @@ -222,3 +222,18 @@ issue_4604: { expect_stdout: "PASS" node_version: ">=4" } + +issue_4606: { + options = { + evaluate: true, + templates: true, + } + input: { + console.log(`${typeof A} ${"\r"} ${"\\"} ${"`"}`); + } + expect: { + console.log(`${typeof A} \r \\ \``); + } + expect_stdout: "undefined \r \\ `" + node_version: ">=4" +} -- cgit v1.2.3