mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 00:14:35 +02:00
Tag tests for U+180E and complete coverage for RegExp matching
This commit is contained in:
parent
554d1fe147
commit
60782de95e
@ -113,6 +113,7 @@ Symbol.unscopables
|
|||||||
tail-call-optimization
|
tail-call-optimization
|
||||||
template
|
template
|
||||||
TypedArray
|
TypedArray
|
||||||
|
u180e
|
||||||
Uint8Array
|
Uint8Array
|
||||||
WeakMap
|
WeakMap
|
||||||
WeakSet
|
WeakSet
|
||||||
|
@ -28,6 +28,7 @@ info: >
|
|||||||
<USP>
|
<USP>
|
||||||
<USP> ::
|
<USP> ::
|
||||||
Other category “Zs” code points
|
Other category “Zs” code points
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(Number('\u180E'), NaN, 'Number("\\u180E") === NaN. Actual: ' + (Number("\u180E")));
|
assert.sameValue(Number('\u180E'), NaN, 'Number("\\u180E") === NaN. Actual: ' + (Number("\u180E")));
|
||||||
|
@ -28,6 +28,7 @@ info: >
|
|||||||
<USP>
|
<USP>
|
||||||
<USP> ::
|
<USP> ::
|
||||||
Other category “Zs” code points
|
Other category “Zs” code points
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
@ -28,6 +28,7 @@ info: >
|
|||||||
<USP>
|
<USP>
|
||||||
<USP> ::
|
<USP> ::
|
||||||
Other category “Zs” code points
|
Other category “Zs” code points
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2){
|
||||||
|
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@ info: |
|
|||||||
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
||||||
|
|
||||||
esid: sec-atom
|
esid: sec-atom
|
||||||
features: [regexp-dotall]
|
features: [regexp-dotall, u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// The behavior is the same regardless of the m flag
|
// The behavior is the same regardless of the m flag
|
||||||
|
@ -12,7 +12,7 @@ info: |
|
|||||||
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
||||||
|
|
||||||
esid: sec-atom
|
esid: sec-atom
|
||||||
features: [regexp-dotall]
|
features: [regexp-dotall, u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// The behavior is the same regardless of the m flag
|
// The behavior is the same regardless of the m flag
|
||||||
|
@ -12,6 +12,7 @@ info: |
|
|||||||
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
||||||
|
|
||||||
esid: sec-atom
|
esid: sec-atom
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// The behavior is the same regardless of the m flag
|
// The behavior is the same regardless of the m flag
|
||||||
|
@ -12,6 +12,7 @@ info: |
|
|||||||
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
3. Call CharacterSetMatcher(A, false) and return its Matcher result.
|
||||||
|
|
||||||
esid: sec-atom
|
esid: sec-atom
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// The behavior is the same regardless of the m flag
|
// The behavior is the same regardless of the m flag
|
||||||
|
26
test/built-ins/RegExp/u180e.js
Normal file
26
test/built-ins/RegExp/u180e.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (C) 2017 Leonardo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: prod-CharacterClassEscape
|
||||||
|
description: >
|
||||||
|
U+180E is no longer a Unicode `Space_Separator` symbol as of Unicode v6.3.0.
|
||||||
|
info: >
|
||||||
|
21.2.2.12 CharacterClassEscape
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
The production CharacterClassEscape::s evaluates as follows:
|
||||||
|
|
||||||
|
Return the set of characters containing the characters that are on the
|
||||||
|
right-hand side of the WhiteSpace or LineTerminator productions.
|
||||||
|
|
||||||
|
The production CharacterClassEscape::S evaluates as follows:
|
||||||
|
|
||||||
|
Return the set of all characters not included in the set returned by
|
||||||
|
CharacterClassEscape::s .
|
||||||
|
features: [u180e]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.sameValue("\u180E".replace(/\s+/g, "42"), "\u180E", "\\s should not match U+180E");
|
||||||
|
assert.sameValue("\u180E".replace(/\S+/g, "42"), "42", "\\S matches U+180E");
|
@ -10,6 +10,7 @@ info: >
|
|||||||
The result must be derived according to the locale-insensitive case mappings in the Unicode Character
|
The result must be derived according to the locale-insensitive case mappings in the Unicode Character
|
||||||
Database (this explicitly includes not only the UnicodeData.txt file, but also all locale-insensitive
|
Database (this explicitly includes not only the UnicodeData.txt file, but also all locale-insensitive
|
||||||
mappings in the SpecialCasings.txt file that accompanies it).
|
mappings in the SpecialCasings.txt file that accompanies it).
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// SpecialCasing.txt, conditional, language-insensitive mappings.
|
// SpecialCasing.txt, conditional, language-insensitive mappings.
|
||||||
|
@ -10,6 +10,7 @@ info: >
|
|||||||
The result must be derived according to the locale-insensitive case mappings in the Unicode Character
|
The result must be derived according to the locale-insensitive case mappings in the Unicode Character
|
||||||
Database (this explicitly includes not only the UnicodeData.txt file, but also all locale-insensitive
|
Database (this explicitly includes not only the UnicodeData.txt file, but also all locale-insensitive
|
||||||
mappings in the SpecialCasings.txt file that accompanies it).
|
mappings in the SpecialCasings.txt file that accompanies it).
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// SpecialCasing.txt, conditional, language-insensitive mappings.
|
// SpecialCasing.txt, conditional, language-insensitive mappings.
|
||||||
|
@ -10,6 +10,7 @@ info: >
|
|||||||
|
|
||||||
3. [...] The definition of white space is the union of |WhiteSpace| and
|
3. [...] The definition of white space is the union of |WhiteSpace| and
|
||||||
|LineTerminator|.
|
|LineTerminator|.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue("_\u180E".trim(), "_\u180E");
|
assert.sameValue("_\u180E".trim(), "_\u180E");
|
||||||
|
@ -18,7 +18,7 @@ info: >
|
|||||||
4. If neither trimmedString nor any prefix of trimmedString satisfies the
|
4. If neither trimmedString nor any prefix of trimmedString satisfies the
|
||||||
syntax of a StrDecimalLiteral (see 7.1.3.1), return NaN.
|
syntax of a StrDecimalLiteral (see 7.1.3.1), return NaN.
|
||||||
...
|
...
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var mongolianVowelSeparator = "\u180E";
|
var mongolianVowelSeparator = "\u180E";
|
||||||
|
@ -22,6 +22,7 @@ info: >
|
|||||||
such code unit; otherwise, let Z be S.
|
such code unit; otherwise, let Z be S.
|
||||||
14. If Z is empty, return NaN.
|
14. If Z is empty, return NaN.
|
||||||
...
|
...
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var mongolianVowelSeparator = "\u180E";
|
var mongolianVowelSeparator = "\u180E";
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(eval("0 //\u180E"), 0);
|
assert.sameValue(eval("0 //\u180E"), 0);
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(eval("`\u180E`"), "\u180E");
|
assert.sameValue(eval("`\u180E`"), "\u180E");
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// U+180E in template literals; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
// U+180E in template literals; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(eval("/\u180E/").source, "\u180E");
|
assert.sameValue(eval("/\u180E/").source, "\u180E");
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// U+180E in regular expressions; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
// U+180E in regular expressions; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(eval("'\u180E'"), "\u180E");
|
assert.sameValue(eval("'\u180E'"), "\u180E");
|
||||||
|
@ -16,6 +16,7 @@ info: >
|
|||||||
It is useful to allow format-control characters in source text to facilitate
|
It is useful to allow format-control characters in source text to facilitate
|
||||||
editing and display. All format control characters may be used within comments,
|
editing and display. All format control characters may be used within comments,
|
||||||
and within string literals, template literals, and regular expression literals.
|
and within string literals, template literals, and regular expression literals.
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// U+180E in strings; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
// U+180E in strings; UTF8(0x180E) = 0xE1 0xA0 0x8E
|
||||||
|
@ -20,6 +20,7 @@ info: >
|
|||||||
Other category “Zs” code points
|
Other category “Zs” code points
|
||||||
|
|
||||||
General Category of U+180E is “Cf” (Format).
|
General Category of U+180E is “Cf” (Format).
|
||||||
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// U+180E between "var" and "foo".
|
// U+180E between "var" and "foo".
|
||||||
|
Loading…
x
Reference in New Issue
Block a user