fix corner case in directives (#3645)

This commit is contained in:
Alex Lam S.L
2019-12-25 00:55:39 +00:00
committed by GitHub
parent 75aa6ef848
commit ab050e7a94
5 changed files with 124 additions and 103 deletions

View File

@@ -93,3 +93,41 @@ issue_3166: {
}
}
}
valid_after_invalid_1: {
input: {
console.log(typeof function() {
"use\x20strict";
"use strict";
return this;
}());
}
expect: {
console.log(typeof function() {
"use\x20strict";
"use strict";
return this;
}());
}
expect_stdout: "undefined"
}
valid_after_invalid_2: {
options = {
directives: true,
}
input: {
console.log(typeof function() {
"use\x20strict";
"use strict";
return this;
}());
}
expect: {
console.log(typeof function() {
"use strict";
return this;
}());
}
expect_stdout: "undefined"
}