test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Tests for `-->` in the first line should not have `raw` flag.

Open woess opened this issue 11 months ago • 2 comments

The following tests added in https://github.com/tc39/test262/pull/4002 have the raw flag but are expected to throw a Test262Error:

test/annexB/language/comments/single-line-html-close-first-line-1.js
test/annexB/language/comments/single-line-html-close-first-line-2.js
test/annexB/language/comments/single-line-html-close-first-line-3.js

If executed without harness/sta.js, these tests will fail with ReferenceError: Test262Error is not defined instead. Therefore, the raw flag should be removed from these tests.

woess avatar Mar 20 '24 15:03 woess

I think we still need raw to make sure that nothing is pre-prended to the test contents, maybe we can throw a string instead of a Test262Error

nicolo-ribaudo avatar Mar 20 '24 15:03 nicolo-ribaudo

If it's important to run those tests in raw mode, maybe using one of the built-in Error types (other than SyntaxError) would be the way to go then? (or including Test262Error/a custom Error class in the test).

woess avatar Mar 20 '24 16:03 woess