From 98938f4c0a3ffe9e52f1365cf099dde86461c719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 6 Feb 2024 22:23:51 +0100 Subject: [PATCH] Add tests for `-->` in the first line --- .../single-line-html-close-first-line-1.js | 22 +++++++++++++++++++ .../single-line-html-close-first-line-2.js | 22 +++++++++++++++++++ .../single-line-html-close-first-line-3.js | 22 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 test/annexB/language/comments/single-line-html-close-first-line-1.js create mode 100644 test/annexB/language/comments/single-line-html-close-first-line-2.js create mode 100644 test/annexB/language/comments/single-line-html-close-first-line-3.js diff --git a/test/annexB/language/comments/single-line-html-close-first-line-1.js b/test/annexB/language/comments/single-line-html-close-first-line-1.js new file mode 100644 index 0000000000..faf72f91d6 --- /dev/null +++ b/test/annexB/language/comments/single-line-html-close-first-line-1.js @@ -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] +---*/ diff --git a/test/annexB/language/comments/single-line-html-close-first-line-2.js b/test/annexB/language/comments/single-line-html-close-first-line-2.js new file mode 100644 index 0000000000..2d59c51e2d --- /dev/null +++ b/test/annexB/language/comments/single-line-html-close-first-line-2.js @@ -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] +---*/ diff --git a/test/annexB/language/comments/single-line-html-close-first-line-3.js b/test/annexB/language/comments/single-line-html-close-first-line-3.js new file mode 100644 index 0000000000..11197d4614 --- /dev/null +++ b/test/annexB/language/comments/single-line-html-close-first-line-3.js @@ -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] +---*/