Skip to content

Commit

Permalink
regexp-generator: Fix indentation
Browse files Browse the repository at this point in the history
Our config files specify two-space indents for JS files. These scripts
were probably written before that was a thing. Update the indentation of
the script and the generated tests all in one go.
  • Loading branch information
ptomato committed Nov 12, 2024
1 parent 7e1f1e7 commit 9a0aa4c
Show file tree
Hide file tree
Showing 26 changed files with 1,090 additions and 1,090 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for digit class escape \d with flags ug
Compare range for digit class escape \d with flags ug
info: |
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
22.2.2.9 Runtime Semantics: CompileToCharSet
22.2.2.9 Runtime Semantics: CompileToCharSet
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3,
4, 5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3, 4,
5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
features: [String.fromCodePoint]
includes: [regExpUtils.js]
flags: [generated]
Expand All @@ -57,16 +57,16 @@ const re = /\d/ug;
const errors = [];

if (!re.test(str)) {
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}

assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for digit class escape \d+ with flags ug
Compare range for digit class escape \d+ with flags ug
info: |
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
22.2.2.9 Runtime Semantics: CompileToCharSet
22.2.2.9 Runtime Semantics: CompileToCharSet
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3,
4, 5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3, 4,
5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
features: [String.fromCodePoint]
includes: [regExpUtils.js]
flags: [generated]
Expand All @@ -57,16 +57,16 @@ const re = /\d+/ug;
const errors = [];

if (!re.test(str)) {
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}

assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for digit class escape \d+ with flags g
Compare range for digit class escape \d+ with flags g
info: |
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
22.2.2.9 Runtime Semantics: CompileToCharSet
22.2.2.9 Runtime Semantics: CompileToCharSet
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3,
4, 5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3, 4,
5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
features: [String.fromCodePoint]
includes: [regExpUtils.js]
flags: [generated]
Expand All @@ -57,16 +57,16 @@ const re = /\d+/g;
const errors = [];

if (!re.test(str)) {
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}

assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for digit class escape \d with flags g
Compare range for digit class escape \d with flags g
info: |
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
This is a generated test. Please check out
https://github.com/tc39/test262/tree/main/tools/regexp-generator/
for any changes.
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
CharacterClassEscape[UnicodeMode] ::
d
D
s
S
w
W
[+UnicodeMode] p{ UnicodePropertyValueExpression }
[+UnicodeMode] P{ UnicodePropertyValueExpression }
22.2.2.9 Runtime Semantics: CompileToCharSet
22.2.2.9 Runtime Semantics: CompileToCharSet
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3,
4, 5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: d
1. Return the ten-element CharSet containing the characters 0, 1, 2, 3, 4,
5, 6, 7, 8, and 9.
CharacterClassEscape :: D
1. Let S be the CharSet returned by CharacterClassEscape :: d.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: s
1. Return the CharSet containing all characters corresponding to a code
point on the right-hand side of the WhiteSpace or LineTerminator
productions.
CharacterClassEscape :: S
1. Let S be the CharSet returned by CharacterClassEscape :: s.
2. Return CharacterComplement(rer, S).
CharacterClassEscape :: w
1. Return MaybeSimpleCaseFolding(rer, WordCharacters(rer)).
CharacterClassEscape :: W
1. Let S be the CharSet returned by CharacterClassEscape :: w.
2. Return CharacterComplement(rer, S).
features: [String.fromCodePoint]
includes: [regExpUtils.js]
flags: [generated]
Expand All @@ -57,16 +57,16 @@ const re = /\d/g;
const errors = [];

if (!re.test(str)) {
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
// Error, let's find out where
for (const char of str) {
if (!re.test(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}

assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);
Loading

0 comments on commit 9a0aa4c

Please sign in to comment.