Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / annexB / language / comments / single-line-html-close-first-line-1.js
blob708e42e4aeaf12dc0b77a3f5e4005d862c0d06be
1 --> a comment
3 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-html-like-comments
7 description: >
8     A SingleLineHTMLCloseComment is allowed in the first line
9 flags: [raw]
10 info: |
11     InputElementHashbangOrRegExp ::
12       WhiteSpace
13       LineTerminator
14       Comment
15       CommonToken
16       HashbangComment
17       RegularExpressionLiteral
18       HTMLCloseComment
20     HTMLCloseComment ::
21       WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
22 negative:
23   phase: runtime
24   type: Test262Error
25 ---*/
27 // Because this test concerns the interpretation of non-executable character
28 // sequences within ECMAScript source code, special care must be taken to
29 // ensure that executable code is evaluated as expected.
31 // Express the intended behavior by intentionally throwing an error; this
32 // guarantees that test runners will only consider the test "passing" if
33 // executable sequences are correctly interpreted as such.
34 throw new Test262Error("This is not in a comment");