-
-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
872e648
commit adcb3b4
Showing
4 changed files
with
95 additions
and
15 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
...leadingCharacterClass/invalid.js.snap.new → ...oMisleadingCharacterClass/invalid.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
assertion_line: 83 | ||
expression: invalid.js | ||
--- | ||
# Input | ||
|
43 changes: 42 additions & 1 deletion
43
crates/biome_js_analyze/tests/specs/nursery/noMisleadingCharacterClass/valid.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
/^[abc]$/; | ||
/^[👍]$/u; | ||
/^[\q{👶🏻}]$/v; | ||
/^[\q{👶🏻}]$/v; | ||
/[👍]/u | ||
/[\\uD83D\\uDC4D]/u | ||
/[\\u{1F44D}]/u | ||
/❇️/ | ||
/Á/ | ||
/[❇]/ | ||
/👶🏻/ | ||
/[👶]/u | ||
/🇯🇵/ | ||
/[JP]/ | ||
/👨👩👦/ | ||
|
||
// Ignore solo lead/tail surrogate. | ||
/[\\uD83D]/ | ||
/[\\uDC4D]/ | ||
/[\\uD83D]/u | ||
/[\\uDC4D]/u | ||
|
||
// // Ignore solo combining char. | ||
/[\\u0301]/ | ||
/[\\uFE0F]/ | ||
/[\\u0301]/u | ||
/[\\uFE0F]/u | ||
|
||
// Ignore solo emoji modifier. | ||
/[\\u{1F3FB}]/u | ||
/[\u{1F3FB}]/u | ||
|
||
// Ignore solo regional indicator symbol. | ||
/[🇯]/u | ||
/[🇵]/u | ||
|
||
// Ignore solo ZWJ. | ||
/[\\u200D]/ | ||
/[\\u200D]/u | ||
|
||
// don't report and don't crash on invalid regex | ||
new RegExp('[Á] [ '); | ||
RegExp('{ [Á]' 'u'); | ||
new globalThis.RegExp('[Á] [ ') | ||
globalThis.RegExp('{ [Á]', 'u') |
53 changes: 53 additions & 0 deletions
53
crates/biome_js_analyze/tests/specs/nursery/noMisleadingCharacterClass/valid.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
expression: valid.js | ||
--- | ||
# Input | ||
```js | ||
/^[abc]$/; | ||
/^[👍]$/u; | ||
/^[\q{👶🏻}]$/v; | ||
/[👍]/u | ||
/[\\uD83D\\uDC4D]/u | ||
/[\\u{1F44D}]/u | ||
/❇️/ | ||
/Á/ | ||
/[❇]/ | ||
/👶🏻/ | ||
/[👶]/u | ||
/🇯🇵/ | ||
/[JP]/ | ||
/👨👩👦/ | ||
|
||
// Ignore solo lead/tail surrogate. | ||
/[\\uD83D]/ | ||
/[\\uDC4D]/ | ||
/[\\uD83D]/u | ||
/[\\uDC4D]/u | ||
|
||
// // Ignore solo combining char. | ||
/[\\u0301]/ | ||
/[\\uFE0F]/ | ||
/[\\u0301]/u | ||
/[\\uFE0F]/u | ||
|
||
// Ignore solo emoji modifier. | ||
/[\\u{1F3FB}]/u | ||
/[\u{1F3FB}]/u | ||
|
||
// Ignore solo regional indicator symbol. | ||
/[🇯]/u | ||
/[🇵]/u | ||
|
||
// Ignore solo ZWJ. | ||
/[\\u200D]/ | ||
/[\\u200D]/u | ||
|
||
// don't report and don't crash on invalid regex | ||
new RegExp('[Á] [ '); | ||
RegExp('{ [Á]' 'u'); | ||
new globalThis.RegExp('[Á] [ ') | ||
globalThis.RegExp('{ [Á]', 'u') | ||
``` | ||
|
||
|
13 changes: 0 additions & 13 deletions
13
crates/biome_js_analyze/tests/specs/nursery/noMisleadingCharacterClass/valid.js.snap.new
This file was deleted.
Oops, something went wrong.