1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:55:09 +00:00

LibJS: Emit TokenType::Invalid for unterminated multi-line comments

This commit is contained in:
Linus Groh 2020-10-26 20:10:50 +00:00 committed by Andreas Kling
parent 03c1d43f6e
commit 19edcbd79c
2 changed files with 19 additions and 1 deletions

View file

@ -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();
});