aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-269.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-269.js')
-rw-r--r--test/compress/issue-269.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/issue-269.js b/test/compress/issue-269.js
index 1d41dea6..a29e7541 100644
--- a/test/compress/issue-269.js
+++ b/test/compress/issue-269.js
@@ -64,3 +64,27 @@ strings_concat: {
);
}
}
+
+regexp: {
+ options = {
+ evaluate: true,
+ unsafe: true,
+ }
+ input: {
+ RegExp("foo");
+ RegExp("bar", "ig");
+ RegExp(foo);
+ RegExp("bar", ig);
+ RegExp("should", "fail");
+ }
+ expect: {
+ /foo/;
+ /bar/ig;
+ RegExp(foo);
+ RegExp("bar", ig);
+ RegExp("should", "fail");
+ }
+ expect_warnings: [
+ 'WARN: Error converting RegExp("should","fail") [test/compress/issue-269.js:78,2]',
+ ]
+}