48 Commits

Author SHA1 Message Date
Ioanna M. Dimitriou H
9e03c403e7 Test parsing error when using unicode escape sequences to express i, m, s
As suggested in https://github.com/tc39/test262/pull/3960#issuecomment-1966827213
2024-03-05 12:56:48 -08:00
Guillaume Emont
229a27bcbc Added new generated tests with uppercase I
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
Cam Tenny
49a58a4716 Adds syntax tests for the RegExp modifiers proposal
Based on PR #3807 which had generated these tests from templates,
but was stuck due to issue #3808.

Co-Authored-By: Guillaume Emont <guijemont@igalia.com>
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
André Bargull
f2275d23f4 Use verifyProperty in language/literals tests 2023-09-13 16:05:40 +02:00
Kevin Gibbons
b42d184876 update descriptions for existing duplicate-capture-groups tests 2022-08-09 12:15:49 -07:00
Rick Waldron
323233be54
chore: migrate $ERROR -> throw new Test262Error in test/language/l* (#3104)
Excludes test/language/line-terminators/*
2021-07-28 13:45:44 -07:00
Alexey Shvayka
34b2ab340c Use non ID_Continue characters in negative tests 2020-04-23 10:48:16 -04:00
Alexey Shvayka
89bb1b79e8 Remove negative parse tests that are now valid 2020-04-23 10:48:16 -04:00
Alexey Shvayka
4a8e49b3ca
Add test for \0 in Unicode patterns (#2569) 2020-04-10 15:41:59 -07:00
Ross Kirsling
fe4e96d8b0 Remove duplicate test regexp/u-dec-esc.js 2020-03-23 14:33:30 -04:00
Alexey Shvayka
7117cddeca Test astral literals within inverted CharacterClass 2020-03-23 14:29:43 -04:00
Mike Pennisi
c9249a8f92 Remove indirect tests
These tests are ostensibly designed to validate parsing of Regular
Expression literals--specifically those which use Unicode escape
sequences to declare flags. However, because the syntax is expressed in
terms of a string literal and then evaluated dynamically, the escape
sequences in use have no bearing on the program code which is ultimately
parsed. These tests therefore do not extend coverage in any meaningful
way and may be removed.
2019-03-31 20:26:12 -04:00
Leo Balter
f7f845ce6f Update tests with DONOTEVALUATE 2018-11-14 09:19:15 -05:00
Leo Balter
dec4e5df74
Merge pull request #1801 from mathiasbynens/issue-1634
Move `throw "…"` for negative parsing errors to a helper function
2018-11-13 17:23:09 -05:00
Kevin Gibbons
0160cab518 fix missing/duplicate tests 2018-11-07 13:52:44 -08:00
Kevin Gibbons
e80d8a184a split unicode-property-names.js 2018-11-05 15:34:03 -08:00
Kevin Gibbons
9bc9116656 split unicode-malformed.js 2018-11-05 15:23:03 -08:00
Kevin Gibbons
296f47a008 split non-unicode-property-names.js 2018-11-05 15:12:23 -08:00
Kevin Gibbons
de339e98d6 split non-unicode-malformed.js 2018-11-05 14:58:03 -08:00
Mathias Bynens
b9daa57dcb Rename to $DONOTEVALUATE per @leobalter's suggestion 2018-10-23 13:51:17 +02:00
Mathias Bynens
e3feffb01e Move throw "…" for negative parsing errors to a helper function
Closes #1634.
2018-10-23 13:51:16 +02:00
Daniel Ehrenberg
73b8d9c773 Revert "Revert "Additional tests for QuantifiableAssertion" (#1458)" (#1459)
This reverts commit 173e98e00b14db854d293108d559b79071dfaab2.
2018-04-09 17:35:13 -04:00
Valerie
1e1d503c1b numeric literal seperators: test change in CodePoint production (#1464) 2018-02-28 13:58:22 -05:00
Leo Balter
173e98e00b
Revert "Additional tests for QuantifiableAssertion" (#1458) 2018-02-26 10:12:09 -05:00
Daniel Ehrenberg
f9a0f05850 Additional tests for QuantifiableAssertion
- Tests that lookahead and lookbehind are not extended to
  QuantifiableAssertion, as in https://github.com/tc39/ecma262/pull/1102
- Additional tests verifying some more combinations of cases for
  QuantifiableAssertion being invalid in Unicode mode.

Based on the tests in https://chromium-review.googlesource.com/c/v8/v8/+/926102

These tests pass on V8 (if the throw for early errors is removed to
work around a V8 issue where RegExps don't have early errors).
2018-02-26 12:34:39 +01:00
Rick Waldron
4afc330363 Fix: various lint fixes 2018-01-10 17:29:48 -05:00
Mike Pennisi
136110378b Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.

Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
2018-01-05 15:17:50 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Rick Waldron
5d4c667b27 test/language/literals/regexp/*: early error test fixups (#1276) 2017-10-16 12:46:28 -04:00
Leo Balter
60782de95e Tag tests for U+180E and complete coverage for RegExp matching 2017-09-25 15:27:59 -04:00
Mike Pennisi
81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00
Kevin Gibbons
b4c633fc4f Add test for inequality of RegExps created from the same source (#776) 2016-10-20 11:41:31 -07:00
Mike Pennisi
ade6d2e384 Remove "NotEarlyError" object
Because expectations regarding error "phase" are now expressed via test
meta-data, the test runner may now enforce this requirement on negative
tests.

Remove the "NotEarlyError" from the project source. This reduces the
amount of domain knowledge required to author tests and lessens the
potential for inconsistencies between tests.
2016-10-19 15:24:22 -04:00
Mike Pennisi
7d4b1d28ae Re-format tests for SyntaxErrors
Authored via the following command:

   $ find test -type f -print0 | \
       xargs -0 sed \
         -i 's/^\(\s*\)negative:\s*SyntaxError\s*$/\1negative:\n\1  phase: early\n\1  type: SyntaxError/g'
2016-10-19 15:24:21 -04:00
jugglinmike
4ffee35d89 Add tests for surrogate pairs with RegExp atoms (#722) 2016-08-25 13:29:51 -07:00
Tom Care
8a6d7a49ee Merge pull request #711 from bocoup/audit2016-section-21-regexp
Improve coverage for section 21: RegExp
2016-08-04 16:22:18 -07:00
jugglinmike
8d78eddcc6 Add test for early error in RegExp literals (#723) 2016-07-08 18:01:35 -07:00
Mathias Bynens
3a5a09eba2 Ensure U+180E is no longer considered whitespace
Ref. https://hashseed.blogspot.com/2014/08/in-ecma-262-5.html
Ref. https://github.com/tc39/ecma262/pull/300#issuecomment-181376767
Ref. 9b10d2a597

Fix and add @anba’s U+180E tests
2016-07-06 10:11:32 -04:00
Mike Pennisi
4e781091f8 Improve tests for RegExp lastIndex property
The prior version of this test asserted only the property's
configurability. It was also limited to the RegExp object as returned
from the RegExp constructor.

Extend the test to verify all values of the property descriptor.
Duplicate these assertions in a separate file dedicated to the RegExp
object as created from a RegExp literal.
2016-06-29 17:29:43 -04:00
Mike Pennisi
9114f815a0 Add test for '^' assertion with 'm' flag
The specification contains an explicit informative NOTE explaining that
the 'm' flag does not effect the behavior of the '^' assertion. Add a
test to verify this.
2016-06-29 17:07:45 -04:00
Mike Pennisi
0ba684e312 Assert SyntaxError with lower bound in escape seq.
ES2015 reads:

> RegExpUnicodeEscapeSequence :: u{ HexDigits }
>
> - It is a Syntax Error if the MV of HexDigits > 1114111.

Use the MV 0x110000 to assert the lower boundary of values which are
expected to produce the SyntaxError.
2016-06-29 12:34:17 -04:00
Mike Pennisi
43bce311db Add tests for Annex B extns to RegExp patterns
Remove previously-existing tests in favor of new versions that are more
complete and more appropriately named.
2016-05-10 10:38:04 -04:00
jugglinmike
c230b7f307 Add tests for RegExp literal early errors (#566) 2016-04-18 13:36:43 -04:00
André Bargull
ffec41b7af Improve compatibility for engines without support for Annex B 2015-09-07 20:40:09 +02:00
André Bargull
1f97345668 Replace runTestCase with assert.throws [test/language/] 2015-08-11 17:43:21 +02:00
Mike Pennisi
9068608ab7 Add tests for RegExp u flag 2015-07-24 14:43:20 -04:00
André Bargull
a85f5039e0 Remove links to hg.ecmascript.org 2015-07-17 17:43:09 +02:00
Brian Terlson
2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00