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:
parent
03c1d43f6e
commit
19edcbd79c
2 changed files with 19 additions and 1 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue