diff options
author | Linus Groh <mail@linusgroh.de> | 2020-10-26 20:10:50 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-26 21:38:34 +0100 |
commit | 19edcbd79cce05e9317815b65f0bcd2fc78260f2 (patch) | |
tree | e7e42ca7767e275ae329af635ec682d5a6c509bd /Libraries/LibJS/Tests | |
parent | 03c1d43f6ecaae72927224622ac54e05e43b3206 (diff) | |
download | serenity-19edcbd79cce05e9317815b65f0bcd2fc78260f2.zip |
LibJS: Emit TokenType::Invalid for unterminated multi-line comments
Diffstat (limited to 'Libraries/LibJS/Tests')
-rw-r--r-- | Libraries/LibJS/Tests/comments-basic.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/comments-basic.js b/Libraries/LibJS/Tests/comments-basic.js index 1a7d281087..f013d59f70 100644 --- a/Libraries/LibJS/Tests/comments-basic.js +++ b/Libraries/LibJS/Tests/comments-basic.js @@ -21,3 +21,11 @@ return i;`; expect(source).toEvalTo(1); }); + +test("unterminated multi-line comment", () => { + expect("/*").not.toEval(); + expect("/**").not.toEval(); + expect("/*/").not.toEval(); + expect("/* foo").not.toEval(); + expect("foo /*").not.toEval(); +}); |