Add tests for `-->` in the first line

This commit is contained in:
Nicolò Ribaudo 2024-02-06 22:23:51 +01:00 committed by Philip Chimento
parent 49e56acc67
commit 98938f4c0a
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,22 @@
--> a comment
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-html-like-comments
description: >
A SingleLineHTMLCloseComment is allowed in the first line
flags: [raw]
info: |
InputElementHashbangOrRegExp ::
WhiteSpace
LineTerminator
Comment
CommonToken
HashbangComment
RegularExpressionLiteral
HTMLCloseComment
HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
---*/

View File

@ -0,0 +1,22 @@
--> a comment
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-html-like-comments
description: >
A SingleLineHTMLCloseComment is allowed in the first line when preceeded by spaces
flags: [raw]
info: |
InputElementHashbangOrRegExp ::
WhiteSpace
LineTerminator
Comment
CommonToken
HashbangComment
RegularExpressionLiteral
HTMLCloseComment
HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
---*/

View File

@ -0,0 +1,22 @@
/* a comment */ /*another comment*/--> a comment
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-html-like-comments
description: >
A SingleLineHTMLCloseComment is allowed in the first line when preceeded by spaces and single-line block comments
flags: [raw]
info: |
InputElementHashbangOrRegExp ::
WhiteSpace
LineTerminator
Comment
CommonToken
HashbangComment
RegularExpressionLiteral
HTMLCloseComment
HTMLCloseComment ::
WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
---*/