mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
[multiple] Update Intl tests.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function thisValues() {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.map(ctor => [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
Object.create(ctor.prototype),
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
])),
|
||||
];
|
||||
}
|
||||
|
||||
// Invoking [[Call]] for Intl.Collator always returns a new Collator instance.
|
||||
for (let thisValue of thisValues()) {
|
||||
let obj = Intl.Collator.call(thisValue);
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.Collator, true);
|
||||
|
||||
// Ensure Intl.[[FallbackSymbol]] wasn't installed on |thisValue|.
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
// Intl.Collator doesn't use the legacy Intl constructor compromise semantics.
|
||||
for (let thisValue of thisValues()) {
|
||||
// Ensure instanceof operator isn't invoked for Intl.Collator.
|
||||
Object.defineProperty(Intl.Collator, Symbol.hasInstance, {
|
||||
get() {
|
||||
assertEq(false, true, "@@hasInstance operator called");
|
||||
}, configurable: true
|
||||
});
|
||||
let obj = Intl.Collator.call(thisValue);
|
||||
delete Intl.Collator[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.Collator, true);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,197 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Locales which use caseFirst=off for the standard (sort) collation type.
|
||||
const defaultLocales = Intl.Collator.supportedLocalesOf(["en", "de", "es", "sv", "ar", "zh", "ja"]);
|
||||
|
||||
// Locales which use caseFirst=upper for the standard (sort) collation type.
|
||||
const upperFirstLocales = Intl.Collator.supportedLocalesOf(["cu", "da", "mt"]);
|
||||
|
||||
// Default collation for zh (pinyin) reorders "á" before "a" at secondary strength level.
|
||||
const accentReordered = ["zh"];
|
||||
|
||||
const allLocales = [...defaultLocales, ...upperFirstLocales];
|
||||
|
||||
|
||||
// Check default "caseFirst" option is resolved correctly.
|
||||
for (let locale of defaultLocales) {
|
||||
let col = new Intl.Collator(locale, {usage: "sort"});
|
||||
assertEq(col.resolvedOptions().caseFirst, "false");
|
||||
}
|
||||
for (let locale of upperFirstLocales) {
|
||||
let col = new Intl.Collator(locale, {usage: "sort"});
|
||||
assertEq(col.resolvedOptions().caseFirst, "upper");
|
||||
}
|
||||
for (let locale of allLocales) {
|
||||
let col = new Intl.Collator(locale, {usage: "search"});
|
||||
assertEq(col.resolvedOptions().caseFirst, "false");
|
||||
}
|
||||
|
||||
|
||||
const collOptions = {usage: "sort"};
|
||||
const primary = {sensitivity: "base"};
|
||||
const secondary = {sensitivity: "accent"};
|
||||
const tertiary = {sensitivity: "variant"};
|
||||
const caseLevel = {sensitivity: "case"};
|
||||
const strengths = [primary, secondary, tertiary, caseLevel];
|
||||
|
||||
// "A" is sorted after "a" when caseFirst=off is the default and strength is tertiary.
|
||||
for (let locale of defaultLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, tertiary));
|
||||
|
||||
assertEq(col.compare("A", "a"), 1);
|
||||
assertEq(col.compare("a", "A"), -1);
|
||||
}
|
||||
for (let locale of defaultLocales.filter(loc => !accentReordered.includes(loc))) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, tertiary));
|
||||
|
||||
assertEq(col.compare("A", "á"), -1);
|
||||
assertEq(col.compare("á", "A"), 1);
|
||||
}
|
||||
|
||||
// Also sorted after "a" with the sensitivity=case collator.
|
||||
for (let locale of defaultLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, caseLevel));
|
||||
|
||||
assertEq(col.compare("A", "a"), 1);
|
||||
assertEq(col.compare("a", "A"), -1);
|
||||
|
||||
assertEq(col.compare("A", "á"), 1);
|
||||
assertEq(col.compare("á", "A"), -1);
|
||||
}
|
||||
|
||||
|
||||
// "A" is sorted before "a" when caseFirst=upper is the default and strength is tertiary.
|
||||
for (let locale of upperFirstLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, tertiary));
|
||||
|
||||
assertEq(col.compare("A", "a"), -1);
|
||||
assertEq(col.compare("a", "A"), 1);
|
||||
|
||||
assertEq(col.compare("A", "á"), -1);
|
||||
assertEq(col.compare("á", "A"), 1);
|
||||
}
|
||||
|
||||
// Also sorted before "a" with the sensitivity=case collator.
|
||||
for (let locale of upperFirstLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, caseLevel));
|
||||
|
||||
assertEq(col.compare("A", "a"), -1);
|
||||
assertEq(col.compare("a", "A"), 1);
|
||||
|
||||
assertEq(col.compare("A", "á"), -1);
|
||||
assertEq(col.compare("á", "A"), 1);
|
||||
}
|
||||
|
||||
|
||||
// caseFirst=upper doesn't change the sort order when strength is below tertiary.
|
||||
for (let locale of allLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, secondary));
|
||||
|
||||
assertEq(col.compare("A", "a"), 0);
|
||||
assertEq(col.compare("a", "A"), 0);
|
||||
}
|
||||
for (let locale of allLocales.filter(loc => !accentReordered.includes(loc))) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, secondary));
|
||||
|
||||
assertEq(col.compare("A", "á"), -1);
|
||||
assertEq(col.compare("á", "A"), 1);
|
||||
}
|
||||
|
||||
for (let locale of allLocales) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, primary));
|
||||
|
||||
assertEq(col.compare("A", "a"), 0);
|
||||
assertEq(col.compare("a", "A"), 0);
|
||||
|
||||
assertEq(col.compare("A", "á"), 0);
|
||||
assertEq(col.compare("á", "A"), 0);
|
||||
}
|
||||
|
||||
|
||||
// caseFirst=upper doesn't change the sort order when there's a primary difference.
|
||||
for (let locale of allLocales) {
|
||||
for (let strength of strengths) {
|
||||
let col = new Intl.Collator(locale, Object.assign({}, collOptions, strength));
|
||||
|
||||
assertEq(col.compare("A", "b"), -1);
|
||||
assertEq(col.compare("a", "B"), -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// caseFirst set through Unicode extension tag.
|
||||
for (let locale of allLocales) {
|
||||
let colKfFalse = new Intl.Collator(locale + "-u-kf-false", {});
|
||||
let colKfLower = new Intl.Collator(locale + "-u-kf-lower", {});
|
||||
let colKfUpper = new Intl.Collator(locale + "-u-kf-upper", {});
|
||||
|
||||
assertEq(colKfFalse.resolvedOptions().caseFirst, "false");
|
||||
assertEq(colKfFalse.compare("A", "a"), 1);
|
||||
assertEq(colKfFalse.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfLower.resolvedOptions().caseFirst, "lower");
|
||||
assertEq(colKfLower.compare("A", "a"), 1);
|
||||
assertEq(colKfLower.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfUpper.resolvedOptions().caseFirst, "upper");
|
||||
assertEq(colKfUpper.compare("A", "a"), -1);
|
||||
assertEq(colKfUpper.compare("a", "A"), 1);
|
||||
}
|
||||
|
||||
|
||||
// caseFirst set through options value.
|
||||
for (let locale of allLocales) {
|
||||
let colKfFalse = new Intl.Collator(locale, {caseFirst: "false"});
|
||||
let colKfLower = new Intl.Collator(locale, {caseFirst: "lower"});
|
||||
let colKfUpper = new Intl.Collator(locale, {caseFirst: "upper"});
|
||||
|
||||
assertEq(colKfFalse.resolvedOptions().caseFirst, "false");
|
||||
assertEq(colKfFalse.compare("A", "a"), 1);
|
||||
assertEq(colKfFalse.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfLower.resolvedOptions().caseFirst, "lower");
|
||||
assertEq(colKfLower.compare("A", "a"), 1);
|
||||
assertEq(colKfLower.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfUpper.resolvedOptions().caseFirst, "upper");
|
||||
assertEq(colKfUpper.compare("A", "a"), -1);
|
||||
assertEq(colKfUpper.compare("a", "A"), 1);
|
||||
}
|
||||
|
||||
|
||||
// Test Unicode extension tag and options value, the latter should win.
|
||||
for (let locale of allLocales) {
|
||||
let colKfFalse = new Intl.Collator(locale + "-u-kf-upper", {caseFirst: "false"});
|
||||
let colKfLower = new Intl.Collator(locale + "-u-kf-upper", {caseFirst: "lower"});
|
||||
let colKfUpper = new Intl.Collator(locale + "-u-kf-lower", {caseFirst: "upper"});
|
||||
|
||||
assertEq(colKfFalse.resolvedOptions().caseFirst, "false");
|
||||
assertEq(colKfFalse.compare("A", "a"), 1);
|
||||
assertEq(colKfFalse.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfLower.resolvedOptions().caseFirst, "lower");
|
||||
assertEq(colKfLower.compare("A", "a"), 1);
|
||||
assertEq(colKfLower.compare("a", "A"), -1);
|
||||
|
||||
assertEq(colKfUpper.resolvedOptions().caseFirst, "upper");
|
||||
assertEq(colKfUpper.compare("A", "a"), -1);
|
||||
assertEq(colKfUpper.compare("a", "A"), 1);
|
||||
}
|
||||
|
||||
// Ensure languages are properly detected when additional subtags are present.
|
||||
if (Intl.Collator.supportedLocalesOf("da").length !== 0) {
|
||||
assertEq(new Intl.Collator("da-DK", {usage: "sort"}).resolvedOptions().caseFirst, "upper");
|
||||
assertEq(new Intl.Collator("da-Latn-DK", {usage: "sort"}).resolvedOptions().caseFirst, "upper");
|
||||
}
|
||||
if (Intl.Collator.supportedLocalesOf("mt").length !== 0) {
|
||||
assertEq(new Intl.Collator("mt-MT", {usage: "sort"}).resolvedOptions().caseFirst, "upper");
|
||||
assertEq(new Intl.Collator("mt-Latn-MT", {usage: "sort"}).resolvedOptions().caseFirst, "upper");
|
||||
}
|
||||
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0, "ok");
|
||||
@@ -0,0 +1,167 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function thisValues() {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.map(ctor => [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
Object.create(ctor.prototype),
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
])),
|
||||
];
|
||||
}
|
||||
|
||||
const intlFallbackSymbol = Object.getOwnPropertySymbols(Intl.DateTimeFormat.call(Object.create(Intl.DateTimeFormat.prototype)))[0];
|
||||
|
||||
// Invoking [[Call]] for Intl.DateTimeFormat returns a new instance unless called
|
||||
// with an instance inheriting from Intl.DateTimeFormat.prototype.
|
||||
for (let thisValue of thisValues()) {
|
||||
let obj = Intl.DateTimeFormat.call(thisValue);
|
||||
|
||||
if (!Intl.DateTimeFormat.prototype.isPrototypeOf(thisValue)) {
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.DateTimeFormat, true);
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
} else {
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEq(obj instanceof Intl.DateTimeFormat, true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
}
|
||||
|
||||
// Intl.DateTimeFormat uses the legacy Intl constructor compromise semantics.
|
||||
// - Test when InstanceofOperator(thisValue, %DateTimeFormat%) returns true.
|
||||
for (let thisValue of thisValues()) {
|
||||
let hasInstanceCalled = false;
|
||||
Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return true;
|
||||
}, configurable: true
|
||||
});
|
||||
if (!IsObject(thisValue)) {
|
||||
// A TypeError is thrown when Intl.DateTimeFormat tries to install the
|
||||
// [[FallbackSymbol]] property on |thisValue|.
|
||||
assertThrowsInstanceOf(() => Intl.DateTimeFormat.call(thisValue), TypeError);
|
||||
delete Intl.DateTimeFormat[Symbol.hasInstance];
|
||||
} else {
|
||||
let obj = Intl.DateTimeFormat.call(thisValue);
|
||||
delete Intl.DateTimeFormat[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
assertEq(hasInstanceCalled, true);
|
||||
}
|
||||
// - Test when InstanceofOperator(thisValue, %DateTimeFormat%) returns false.
|
||||
for (let thisValue of thisValues()) {
|
||||
let hasInstanceCalled = false;
|
||||
Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return false;
|
||||
}, configurable: true
|
||||
});
|
||||
let obj = Intl.DateTimeFormat.call(thisValue);
|
||||
delete Intl.DateTimeFormat[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.DateTimeFormat, true);
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
assertEq(hasInstanceCalled, true);
|
||||
}
|
||||
|
||||
// Throws an error when attempting to install [[FallbackSymbol]] twice.
|
||||
{
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
|
||||
assertEq(Intl.DateTimeFormat.call(thisValue), thisValue);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
|
||||
assertThrowsInstanceOf(() => Intl.DateTimeFormat.call(thisValue), TypeError);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
|
||||
// Throws an error when the thisValue is non-extensible.
|
||||
{
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
Object.preventExtensions(thisValue);
|
||||
|
||||
assertThrowsInstanceOf(() => Intl.DateTimeFormat.call(thisValue), TypeError);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
// [[FallbackSymbol]] is installed as a frozen property holding an Intl.DateTimeFormat instance.
|
||||
{
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
Intl.DateTimeFormat.call(thisValue);
|
||||
|
||||
let desc = Object.getOwnPropertyDescriptor(thisValue, intlFallbackSymbol);
|
||||
assertEq(desc !== undefined, true);
|
||||
assertEq(desc.writable, false);
|
||||
assertEq(desc.enumerable, false);
|
||||
assertEq(desc.configurable, false);
|
||||
assertEq(desc.value instanceof Intl.DateTimeFormat, true);
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] is installed last by changing the [[Prototype]]
|
||||
// during initialization.
|
||||
{
|
||||
let thisValue = {};
|
||||
let options = {
|
||||
get hour12() {
|
||||
Object.setPrototypeOf(thisValue, Intl.DateTimeFormat.prototype);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
let obj = Intl.DateTimeFormat.call(thisValue, undefined, options);
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
{
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
let options = {
|
||||
get hour12() {
|
||||
Object.setPrototypeOf(thisValue, Object.prototype);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
let obj = Intl.DateTimeFormat.call(thisValue, undefined, options);
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,145 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
const hourCycleToH12Map = {
|
||||
"h11": true,
|
||||
"h12": true,
|
||||
"h23": false,
|
||||
"h24": false,
|
||||
};
|
||||
|
||||
for (const key of Object.keys(hourCycleToH12Map)) {
|
||||
const langTag = "en-US";
|
||||
const loc = `${langTag}-u-hc-${key}`;
|
||||
|
||||
const dtf = new Intl.DateTimeFormat(loc, {hour: "numeric"});
|
||||
const dtf2 = new Intl.DateTimeFormat(langTag, {hour: "numeric", hourCycle: key});
|
||||
assertEq(dtf.resolvedOptions().hourCycle, dtf2.resolvedOptions().hourCycle);
|
||||
}
|
||||
|
||||
|
||||
/* Legacy hour12 compatibility */
|
||||
|
||||
// When constructed with hourCycle option, resolvedOptions' hour12 is correct.
|
||||
for (const key of Object.keys(hourCycleToH12Map)) {
|
||||
const dtf = new Intl.DateTimeFormat("en-US", {hour: "numeric", hourCycle: key});
|
||||
assertEq(dtf.resolvedOptions().hour12, hourCycleToH12Map[key]);
|
||||
}
|
||||
|
||||
// When constructed with hour12 option, resolvedOptions' hourCycle is correct
|
||||
for (const [key, value] of Object.entries(hourCycleToH12Map)) {
|
||||
const dtf = new Intl.DateTimeFormat("en-US", {hour: "numeric", hour12: value});
|
||||
assertEq(hourCycleToH12Map[dtf.resolvedOptions().hourCycle], value);
|
||||
}
|
||||
|
||||
// When constructed with both hour12 and hourCycle options that don't match
|
||||
// hour12 takes a precedence.
|
||||
for (const [key, value] of Object.entries(hourCycleToH12Map)) {
|
||||
const dtf = new Intl.DateTimeFormat("en-US", {
|
||||
hour: "numeric",
|
||||
hourCycle: key,
|
||||
hour12: !value
|
||||
});
|
||||
assertEq(hourCycleToH12Map[dtf.resolvedOptions().hourCycle], !value);
|
||||
assertEq(dtf.resolvedOptions().hour12, !value);
|
||||
}
|
||||
|
||||
// When constructed with hourCycle as extkey, resolvedOptions' hour12 is correct.
|
||||
for (const [key, value] of Object.entries(hourCycleToH12Map)) {
|
||||
const langTag = "en-US";
|
||||
const loc = `${langTag}-u-hc-${key}`;
|
||||
|
||||
const dtf = new Intl.DateTimeFormat(loc, {hour: "numeric"});
|
||||
assertEq(dtf.resolvedOptions().hour12, value);
|
||||
}
|
||||
|
||||
const expectedValuesENUS = {
|
||||
h11: "0 AM",
|
||||
h12: "12 AM",
|
||||
h23: "00",
|
||||
h24: "24"
|
||||
};
|
||||
|
||||
const exampleDate = new Date(2017, 10-1, 10, 0);
|
||||
for (const [key, val] of Object.entries(expectedValuesENUS)) {
|
||||
assertEq(
|
||||
Intl.DateTimeFormat("en-US", {hour: "numeric", hourCycle: key}).format(exampleDate),
|
||||
val
|
||||
);
|
||||
}
|
||||
|
||||
const invalidHourCycleValues = [
|
||||
"h5",
|
||||
"h0",
|
||||
"h28",
|
||||
"f28",
|
||||
"23",
|
||||
];
|
||||
|
||||
for (const key of invalidHourCycleValues) {
|
||||
const langTag = "en-US";
|
||||
const loc = `${langTag}-u-hc-${key}`;
|
||||
|
||||
const dtf = new Intl.DateTimeFormat(loc, {hour: "numeric"});
|
||||
assertEq(dtf.resolvedOptions().hour12, true); // default value for en-US
|
||||
assertEq(dtf.resolvedOptions().hourCycle, "h12"); //default value for en-US
|
||||
}
|
||||
|
||||
{
|
||||
// hourCycle is not present in resolvedOptions when the formatter has no hour field
|
||||
const options = Intl.DateTimeFormat("en-US", {hourCycle:"h11"}).resolvedOptions();
|
||||
assertEq("hourCycle" in options, false);
|
||||
assertEq("hour12" in options, false);
|
||||
}
|
||||
|
||||
{
|
||||
// Make sure that hourCycle option overrides the unicode extension
|
||||
let dtf = Intl.DateTimeFormat("en-US-u-hc-h23", {hourCycle: "h24", hour: "numeric"});
|
||||
assertEq(
|
||||
dtf.resolvedOptions().hourCycle,
|
||||
"h24"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
// Make sure that hour12 option overrides the unicode extension
|
||||
let dtf = Intl.DateTimeFormat("en-US-u-hc-h23", {hour12: true, hour: "numeric"});
|
||||
assertEq(
|
||||
dtf.resolvedOptions().hourCycle,
|
||||
"h12"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
// Make sure that hour12 option overrides hourCycle options
|
||||
let dtf = Intl.DateTimeFormat("en-US",
|
||||
{hourCycle: "h12", hour12: false, hour: "numeric"});
|
||||
assertEq(
|
||||
dtf.resolvedOptions().hourCycle,
|
||||
"h23"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
// Make sure that hour12 option overrides hourCycle options
|
||||
let dtf = Intl.DateTimeFormat("en-u-hc-h11", {hour: "numeric"});
|
||||
assertEq(
|
||||
dtf.resolvedOptions().locale,
|
||||
"en-u-hc-h11"
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
// Make sure that hour12 option overrides unicode extension
|
||||
let dtf = Intl.DateTimeFormat("en-u-hc-h11", {hour: "numeric", hourCycle: "h24"});
|
||||
assertEq(
|
||||
dtf.resolvedOptions().locale,
|
||||
"en"
|
||||
);
|
||||
assertEq(
|
||||
dtf.resolvedOptions().hourCycle,
|
||||
"h24"
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0, "ok");
|
||||
@@ -0,0 +1,58 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl")||!this.hasOwnProperty("addIntlExtras"))
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Tests the format function with a diverse set of locales and options.
|
||||
// Always use UTC to avoid dependencies on test environment.
|
||||
|
||||
let mozIntl = {};
|
||||
addIntlExtras(mozIntl);
|
||||
|
||||
// Pattern
|
||||
|
||||
var dtf = new Intl.DateTimeFormat("en-US", {pattern: "HH:mm MM/dd/YYYY"});
|
||||
var mozDtf = new mozIntl.DateTimeFormat("en-US", {pattern: "HH:mm MM/dd/YYYY"});
|
||||
|
||||
assertEq(dtf.resolvedOptions().hasOwnProperty('pattern'), false);
|
||||
assertEq(mozDtf.resolvedOptions().pattern, "HH:mm MM/dd/YYYY");
|
||||
|
||||
// Date style
|
||||
|
||||
var dtf = new Intl.DateTimeFormat("en-US", {dateStyle: 'long'});
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('dateStyle'), false);
|
||||
|
||||
var mozDtf = new mozIntl.DateTimeFormat("en-US", {dateStyle: 'long'});
|
||||
assertEq(mozDtf.resolvedOptions().dateStyle, 'long');
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('year'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('month'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('day'), true);
|
||||
|
||||
// Time style
|
||||
|
||||
var dtf = new Intl.DateTimeFormat("en-US", {timeStyle: 'long'});
|
||||
assertEq(dtf.resolvedOptions().hasOwnProperty('dateStyle'), false);
|
||||
|
||||
var mozDtf = new mozIntl.DateTimeFormat("en-US", {timeStyle: 'long'});
|
||||
assertEq(mozDtf.resolvedOptions().timeStyle, 'long');
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('hour'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('minute'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('second'), true);
|
||||
|
||||
// Date/Time style
|
||||
|
||||
var dtf = new Intl.DateTimeFormat("en-US", {timeStyle: 'medium', dateStyle: 'medium'});
|
||||
assertEq(dtf.resolvedOptions().hasOwnProperty('dateStyle'), false);
|
||||
assertEq(dtf.resolvedOptions().hasOwnProperty('timeStyle'), false);
|
||||
|
||||
var mozDtf = new mozIntl.DateTimeFormat("en-US", {dateStyle: 'medium', timeStyle: 'medium'});
|
||||
assertEq(mozDtf.resolvedOptions().timeStyle, 'medium');
|
||||
assertEq(mozDtf.resolvedOptions().dateStyle, 'medium');
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('hour'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('minute'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('second'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('year'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('month'), true);
|
||||
assertEq(mozDtf.resolvedOptions().hasOwnProperty('day'), true);
|
||||
|
||||
reportCompare(0, 0, 'ok');
|
||||
@@ -0,0 +1,224 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Test UnwrapDateTimeFormat operation.
|
||||
|
||||
const dateTimeFormatFunctions = [];
|
||||
dateTimeFormatFunctions.push(Intl.DateTimeFormat.prototype.resolvedOptions);
|
||||
dateTimeFormatFunctions.push(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get);
|
||||
dateTimeFormatFunctions.push(Intl.DateTimeFormat.prototype.formatToParts);
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function intlObjects(ctor) {
|
||||
return [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
];
|
||||
}
|
||||
|
||||
function thisValues(C) {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.filter(ctor => ctor !== C).map(intlObjects)),
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
...intlConstructors.map(ctor => Object.create(ctor.prototype)),
|
||||
];
|
||||
}
|
||||
|
||||
const intlFallbackSymbol = Object.getOwnPropertySymbols(Intl.DateTimeFormat.call(Object.create(Intl.DateTimeFormat.prototype)))[0];
|
||||
|
||||
// Test Intl.DateTimeFormat.prototype methods.
|
||||
for (let dateTimeFormatFunction of dateTimeFormatFunctions) {
|
||||
// Test a TypeError is thrown when the this-value isn't an initialized
|
||||
// Intl.DateTimeFormat instance.
|
||||
for (let thisValue of thisValues(Intl.DateTimeFormat)) {
|
||||
assertThrowsInstanceOf(() => dateTimeFormatFunction.call(thisValue), TypeError);
|
||||
}
|
||||
|
||||
// And test no error is thrown for initialized Intl.DateTimeFormat instances.
|
||||
for (let thisValue of intlObjects(Intl.DateTimeFormat)) {
|
||||
dateTimeFormatFunction.call(thisValue);
|
||||
}
|
||||
|
||||
// Manually add [[FallbackSymbol]] to objects and then repeat the tests from above.
|
||||
for (let thisValue of thisValues(Intl.DateTimeFormat)) {
|
||||
assertThrowsInstanceOf(() => dateTimeFormatFunction.call({
|
||||
__proto__: Intl.DateTimeFormat.prototype,
|
||||
[intlFallbackSymbol]: thisValue,
|
||||
}), TypeError);
|
||||
}
|
||||
|
||||
for (let thisValue of intlObjects(Intl.DateTimeFormat)) {
|
||||
dateTimeFormatFunction.call({
|
||||
__proto__: Intl.DateTimeFormat.prototype,
|
||||
[intlFallbackSymbol]: thisValue,
|
||||
});
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] isn't retrieved for Intl.DateTimeFormat instances.
|
||||
for (let thisValue of intlObjects(Intl.DateTimeFormat)) {
|
||||
Object.defineProperty(thisValue, intlFallbackSymbol, {
|
||||
get() { assertEq(false, true); }
|
||||
});
|
||||
dateTimeFormatFunction.call(thisValue);
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] is only retrieved for objects inheriting from Intl.DateTimeFormat.prototype.
|
||||
for (let thisValue of thisValues(Intl.DateTimeFormat)) {
|
||||
if (!IsObject(thisValue) || Intl.DateTimeFormat.prototype.isPrototypeOf(thisValue))
|
||||
continue;
|
||||
Object.defineProperty(thisValue, intlFallbackSymbol, {
|
||||
get() { assertEq(false, true); }
|
||||
});
|
||||
assertThrowsInstanceOf(() => dateTimeFormatFunction.call(thisValue), TypeError);
|
||||
}
|
||||
|
||||
// Repeat the test from above, but also change Intl.DateTimeFormat[@@hasInstance]
|
||||
// so it always returns |null|.
|
||||
for (let thisValue of thisValues(Intl.DateTimeFormat)) {
|
||||
let hasInstanceCalled = false, symbolGetterCalled = false;
|
||||
Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return true;
|
||||
}, configurable: true
|
||||
});
|
||||
let isUndefinedOrNull = thisValue !== undefined || thisValue !== null;
|
||||
let symbolHolder;
|
||||
if (!isUndefinedOrNull) {
|
||||
symbolHolder = IsObject(thisValue) ? thisValue : Object.getPrototypeOf(thisValue);
|
||||
Object.defineProperty(symbolHolder, intlFallbackSymbol, {
|
||||
get() {
|
||||
assertEq(symbolGetterCalled, false);
|
||||
symbolGetterCalled = true;
|
||||
return null;
|
||||
}, configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
assertThrowsInstanceOf(() => dateTimeFormatFunction.call(thisValue), TypeError);
|
||||
|
||||
delete Intl.DateTimeFormat[Symbol.hasInstance];
|
||||
if (!isUndefinedOrNull && !IsObject(thisValue))
|
||||
delete symbolHolder[intlFallbackSymbol];
|
||||
|
||||
assertEq(hasInstanceCalled, true);
|
||||
assertEq(symbolGetterCalled, !isUndefinedOrNull);
|
||||
}
|
||||
}
|
||||
|
||||
// Test format() returns the correct result for objects initialized as Intl.DateTimeFormat instances.
|
||||
{
|
||||
// An actual Intl.DateTimeFormat instance.
|
||||
let dateTimeFormat = new Intl.DateTimeFormat();
|
||||
|
||||
// An object initialized as a DateTimeFormat instance.
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
Intl.DateTimeFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to DateTimeFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.DateTimeFormat.prototype,
|
||||
[intlFallbackSymbol]: dateTimeFormat,
|
||||
};
|
||||
|
||||
for (let number of [0, Date.now(), -Date.now()]) {
|
||||
let expected = dateTimeFormat.format(number);
|
||||
assertEq(thisValue.format(number), expected);
|
||||
assertEq(thisValue[intlFallbackSymbol].format(number), expected);
|
||||
assertEq(fakeObj.format(number), expected);
|
||||
}
|
||||
}
|
||||
|
||||
// Test formatToParts() returns the correct result for objects initialized as Intl.DateTimeFormat instances.
|
||||
if ("formatToParts" in Intl.DateTimeFormat.prototype) {
|
||||
// An actual Intl.DateTimeFormat instance.
|
||||
let dateTimeFormat = new Intl.DateTimeFormat();
|
||||
|
||||
// An object initialized as a DateTimeFormat instance.
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
Intl.DateTimeFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to DateTimeFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.DateTimeFormat.prototype,
|
||||
[intlFallbackSymbol]: dateTimeFormat,
|
||||
};
|
||||
|
||||
function assertEqParts(actual, expected) {
|
||||
assertEq(actual.length, expected.length, "parts count mismatch");
|
||||
for (var i = 0; i < expected.length; i++) {
|
||||
assertEq(actual[i].type, expected[i].type, "type mismatch at " + i);
|
||||
assertEq(actual[i].value, expected[i].value, "value mismatch at " + i);
|
||||
}
|
||||
}
|
||||
|
||||
for (let number of [0, Date.now(), -Date.now()]) {
|
||||
let expected = dateTimeFormat.formatToParts(number);
|
||||
assertEqParts(thisValue.formatToParts(number), expected);
|
||||
assertEqParts(thisValue[intlFallbackSymbol].formatToParts(number), expected);
|
||||
assertEqParts(fakeObj.formatToParts(number), expected);
|
||||
}
|
||||
}
|
||||
|
||||
// Test resolvedOptions() returns the same results.
|
||||
{
|
||||
// An actual Intl.DateTimeFormat instance.
|
||||
let dateTimeFormat = new Intl.DateTimeFormat();
|
||||
|
||||
// An object initialized as a DateTimeFormat instance.
|
||||
let thisValue = Object.create(Intl.DateTimeFormat.prototype);
|
||||
Intl.DateTimeFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to DateTimeFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.DateTimeFormat.prototype,
|
||||
[intlFallbackSymbol]: dateTimeFormat,
|
||||
};
|
||||
|
||||
function assertEqOptions(actual, expected) {
|
||||
actual = Object.entries(actual);
|
||||
expected = Object.entries(expected);
|
||||
|
||||
assertEq(actual.length, expected.length, "options count mismatch");
|
||||
for (var i = 0; i < expected.length; i++) {
|
||||
assertEq(actual[i][0], expected[i][0], "key mismatch at " + i);
|
||||
assertEq(actual[i][1], expected[i][1], "value mismatch at " + i);
|
||||
}
|
||||
}
|
||||
|
||||
let expected = dateTimeFormat.resolvedOptions();
|
||||
assertEqOptions(thisValue.resolvedOptions(), expected);
|
||||
assertEqOptions(thisValue[intlFallbackSymbol].resolvedOptions(), expected);
|
||||
assertEqOptions(fakeObj.resolvedOptions(), expected);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,167 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function thisValues() {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.map(ctor => [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
Object.create(ctor.prototype),
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
])),
|
||||
];
|
||||
}
|
||||
|
||||
const intlFallbackSymbol = Object.getOwnPropertySymbols(Intl.NumberFormat.call(Object.create(Intl.NumberFormat.prototype)))[0];
|
||||
|
||||
// Invoking [[Call]] for Intl.NumberFormat returns a new instance unless called
|
||||
// with an instance inheriting from Intl.NumberFormat.prototype.
|
||||
for (let thisValue of thisValues()) {
|
||||
let obj = Intl.NumberFormat.call(thisValue);
|
||||
|
||||
if (!Intl.NumberFormat.prototype.isPrototypeOf(thisValue)) {
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.NumberFormat, true);
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
} else {
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEq(obj instanceof Intl.NumberFormat, true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
}
|
||||
|
||||
// Intl.NumberFormat uses the legacy Intl constructor compromise semantics.
|
||||
// - Test when InstanceofOperator(thisValue, %NumberFormat%) returns true.
|
||||
for (let thisValue of thisValues()) {
|
||||
let hasInstanceCalled = false;
|
||||
Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return true;
|
||||
}, configurable: true
|
||||
});
|
||||
if (!IsObject(thisValue)) {
|
||||
// A TypeError is thrown when Intl.NumberFormat tries to install the
|
||||
// [[FallbackSymbol]] property on |thisValue|.
|
||||
assertThrowsInstanceOf(() => Intl.NumberFormat.call(thisValue), TypeError);
|
||||
delete Intl.NumberFormat[Symbol.hasInstance];
|
||||
} else {
|
||||
let obj = Intl.NumberFormat.call(thisValue);
|
||||
delete Intl.NumberFormat[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
assertEq(hasInstanceCalled, true);
|
||||
}
|
||||
// - Test when InstanceofOperator(thisValue, %NumberFormat%) returns false.
|
||||
for (let thisValue of thisValues()) {
|
||||
let hasInstanceCalled = false;
|
||||
Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return false;
|
||||
}, configurable: true
|
||||
});
|
||||
let obj = Intl.NumberFormat.call(thisValue);
|
||||
delete Intl.NumberFormat[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.NumberFormat, true);
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
assertEq(hasInstanceCalled, true);
|
||||
}
|
||||
|
||||
// Throws an error when attempting to install [[FallbackSymbol]] twice.
|
||||
{
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
|
||||
assertEq(Intl.NumberFormat.call(thisValue), thisValue);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
|
||||
assertThrowsInstanceOf(() => Intl.NumberFormat.call(thisValue), TypeError);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
|
||||
// Throws an error when the thisValue is non-extensible.
|
||||
{
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
Object.preventExtensions(thisValue);
|
||||
|
||||
assertThrowsInstanceOf(() => Intl.NumberFormat.call(thisValue), TypeError);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
// [[FallbackSymbol]] is installed as a frozen property holding an Intl.NumberFormat instance.
|
||||
{
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
Intl.NumberFormat.call(thisValue);
|
||||
|
||||
let desc = Object.getOwnPropertyDescriptor(thisValue, intlFallbackSymbol);
|
||||
assertEq(desc !== undefined, true);
|
||||
assertEq(desc.writable, false);
|
||||
assertEq(desc.enumerable, false);
|
||||
assertEq(desc.configurable, false);
|
||||
assertEq(desc.value instanceof Intl.NumberFormat, true);
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] is installed last by changing the [[Prototype]]
|
||||
// during initialization.
|
||||
{
|
||||
let thisValue = {};
|
||||
let options = {
|
||||
get useGrouping() {
|
||||
Object.setPrototypeOf(thisValue, Intl.NumberFormat.prototype);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
let obj = Intl.NumberFormat.call(thisValue, undefined, options);
|
||||
assertEq(Object.is(obj, thisValue), true);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), [intlFallbackSymbol]);
|
||||
}
|
||||
{
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
let options = {
|
||||
get useGrouping() {
|
||||
Object.setPrototypeOf(thisValue, Object.prototype);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
let obj = Intl.NumberFormat.call(thisValue, undefined, options);
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,226 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Test UnwrapNumberFormat operation.
|
||||
|
||||
const numberFormatFunctions = [];
|
||||
numberFormatFunctions.push(Intl.NumberFormat.prototype.resolvedOptions);
|
||||
numberFormatFunctions.push(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get);
|
||||
// "formatToParts" isn't yet enabled by default.
|
||||
if ("formatToParts" in Intl.NumberFormat.prototype)
|
||||
numberFormatFunctions.push(Intl.NumberFormat.prototype.formatToParts);
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function intlObjects(ctor) {
|
||||
return [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
];
|
||||
}
|
||||
|
||||
function thisValues(C) {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.filter(ctor => ctor !== C).map(intlObjects)),
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
...intlConstructors.map(ctor => Object.create(ctor.prototype)),
|
||||
];
|
||||
}
|
||||
|
||||
const intlFallbackSymbol = Object.getOwnPropertySymbols(Intl.NumberFormat.call(Object.create(Intl.NumberFormat.prototype)))[0];
|
||||
|
||||
// Test Intl.NumberFormat.prototype methods.
|
||||
for (let numberFormatFunction of numberFormatFunctions) {
|
||||
// Test a TypeError is thrown when the this-value isn't an initialized
|
||||
// Intl.NumberFormat instance.
|
||||
for (let thisValue of thisValues(Intl.NumberFormat)) {
|
||||
assertThrowsInstanceOf(() => numberFormatFunction.call(thisValue), TypeError);
|
||||
}
|
||||
|
||||
// And test no error is thrown for initialized Intl.NumberFormat instances.
|
||||
for (let thisValue of intlObjects(Intl.NumberFormat)) {
|
||||
numberFormatFunction.call(thisValue);
|
||||
}
|
||||
|
||||
// Manually add [[FallbackSymbol]] to objects and then repeat the tests from above.
|
||||
for (let thisValue of thisValues(Intl.NumberFormat)) {
|
||||
assertThrowsInstanceOf(() => numberFormatFunction.call({
|
||||
__proto__: Intl.NumberFormat.prototype,
|
||||
[intlFallbackSymbol]: thisValue,
|
||||
}), TypeError);
|
||||
}
|
||||
|
||||
for (let thisValue of intlObjects(Intl.NumberFormat)) {
|
||||
numberFormatFunction.call({
|
||||
__proto__: Intl.NumberFormat.prototype,
|
||||
[intlFallbackSymbol]: thisValue,
|
||||
});
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] isn't retrieved for Intl.NumberFormat instances.
|
||||
for (let thisValue of intlObjects(Intl.NumberFormat)) {
|
||||
Object.defineProperty(thisValue, intlFallbackSymbol, {
|
||||
get() { assertEq(false, true); }
|
||||
});
|
||||
numberFormatFunction.call(thisValue);
|
||||
}
|
||||
|
||||
// Ensure [[FallbackSymbol]] is only retrieved for objects inheriting from Intl.NumberFormat.prototype.
|
||||
for (let thisValue of thisValues(Intl.NumberFormat)) {
|
||||
if (!IsObject(thisValue) || Intl.NumberFormat.prototype.isPrototypeOf(thisValue))
|
||||
continue;
|
||||
Object.defineProperty(thisValue, intlFallbackSymbol, {
|
||||
get() { assertEq(false, true); }
|
||||
});
|
||||
assertThrowsInstanceOf(() => numberFormatFunction.call(thisValue), TypeError);
|
||||
}
|
||||
|
||||
// Repeat the test from above, but also change Intl.NumberFormat[@@hasInstance]
|
||||
// so it always returns |null|.
|
||||
for (let thisValue of thisValues(Intl.NumberFormat)) {
|
||||
let hasInstanceCalled = false, symbolGetterCalled = false;
|
||||
Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
|
||||
value() {
|
||||
assertEq(hasInstanceCalled, false);
|
||||
hasInstanceCalled = true;
|
||||
return true;
|
||||
}, configurable: true
|
||||
});
|
||||
let isUndefinedOrNull = thisValue !== undefined || thisValue !== null;
|
||||
let symbolHolder;
|
||||
if (!isUndefinedOrNull) {
|
||||
symbolHolder = IsObject(thisValue) ? thisValue : Object.getPrototypeOf(thisValue);
|
||||
Object.defineProperty(symbolHolder, intlFallbackSymbol, {
|
||||
get() {
|
||||
assertEq(symbolGetterCalled, false);
|
||||
symbolGetterCalled = true;
|
||||
return null;
|
||||
}, configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
assertThrowsInstanceOf(() => numberFormatFunction.call(thisValue), TypeError);
|
||||
|
||||
delete Intl.NumberFormat[Symbol.hasInstance];
|
||||
if (!isUndefinedOrNull && !IsObject(thisValue))
|
||||
delete symbolHolder[intlFallbackSymbol];
|
||||
|
||||
assertEq(hasInstanceCalled, true);
|
||||
assertEq(symbolGetterCalled, !isUndefinedOrNull);
|
||||
}
|
||||
}
|
||||
|
||||
// Test format() returns the correct result for objects initialized as Intl.NumberFormat instances.
|
||||
{
|
||||
// An actual Intl.NumberFormat instance.
|
||||
let numberFormat = new Intl.NumberFormat();
|
||||
|
||||
// An object initialized as a NumberFormat instance.
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
Intl.NumberFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to NumberFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.NumberFormat.prototype,
|
||||
[intlFallbackSymbol]: numberFormat,
|
||||
};
|
||||
|
||||
for (let number of [0, 1, 1.5, Infinity, NaN]) {
|
||||
let expected = numberFormat.format(number);
|
||||
assertEq(thisValue.format(number), expected);
|
||||
assertEq(thisValue[intlFallbackSymbol].format(number), expected);
|
||||
assertEq(fakeObj.format(number), expected);
|
||||
}
|
||||
}
|
||||
|
||||
// Test formatToParts() returns the correct result for objects initialized as Intl.NumberFormat instances.
|
||||
if ("formatToParts" in Intl.NumberFormat.prototype) {
|
||||
// An actual Intl.NumberFormat instance.
|
||||
let numberFormat = new Intl.NumberFormat();
|
||||
|
||||
// An object initialized as a NumberFormat instance.
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
Intl.NumberFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to NumberFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.NumberFormat.prototype,
|
||||
[intlFallbackSymbol]: numberFormat,
|
||||
};
|
||||
|
||||
function assertEqParts(actual, expected) {
|
||||
assertEq(actual.length, expected.length, "parts count mismatch");
|
||||
for (var i = 0; i < expected.length; i++) {
|
||||
assertEq(actual[i].type, expected[i].type, "type mismatch at " + i);
|
||||
assertEq(actual[i].value, expected[i].value, "value mismatch at " + i);
|
||||
}
|
||||
}
|
||||
|
||||
for (let number of [0, 1, 1.5, Infinity, NaN]) {
|
||||
let expected = numberFormat.formatToParts(number);
|
||||
assertEqParts(thisValue.formatToParts(number), expected);
|
||||
assertEqParts(thisValue[intlFallbackSymbol].formatToParts(number), expected);
|
||||
assertEqParts(fakeObj.formatToParts(number), expected);
|
||||
}
|
||||
}
|
||||
|
||||
// Test resolvedOptions() returns the same results.
|
||||
{
|
||||
// An actual Intl.NumberFormat instance.
|
||||
let numberFormat = new Intl.NumberFormat();
|
||||
|
||||
// An object initialized as a NumberFormat instance.
|
||||
let thisValue = Object.create(Intl.NumberFormat.prototype);
|
||||
Intl.NumberFormat.call(thisValue);
|
||||
|
||||
// Object with [[FallbackSymbol]] set to NumberFormat instance.
|
||||
let fakeObj = {
|
||||
__proto__: Intl.NumberFormat.prototype,
|
||||
[intlFallbackSymbol]: numberFormat,
|
||||
};
|
||||
|
||||
function assertEqOptions(actual, expected) {
|
||||
actual = Object.entries(actual);
|
||||
expected = Object.entries(expected);
|
||||
|
||||
assertEq(actual.length, expected.length, "options count mismatch");
|
||||
for (var i = 0; i < expected.length; i++) {
|
||||
assertEq(actual[i][0], expected[i][0], "key mismatch at " + i);
|
||||
assertEq(actual[i][1], expected[i][1], "value mismatch at " + i);
|
||||
}
|
||||
}
|
||||
|
||||
let expected = numberFormat.resolvedOptions();
|
||||
assertEqOptions(thisValue.resolvedOptions(), expected);
|
||||
assertEqOptions(thisValue[intlFallbackSymbol].resolvedOptions(), expected);
|
||||
assertEqOptions(fakeObj.resolvedOptions(), expected);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,71 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl")||!this.hasOwnProperty("addIntlExtras"))
|
||||
|
||||
addIntlExtras(Intl);
|
||||
|
||||
function IsConstructor(o) {
|
||||
try {
|
||||
new (new Proxy(o, {construct: () => ({})}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function IsObject(o) {
|
||||
return Object(o) === o;
|
||||
}
|
||||
|
||||
function thisValues() {
|
||||
const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsConstructor);
|
||||
|
||||
return [
|
||||
// Primitive values.
|
||||
...[undefined, null, true, "abc", Symbol(), 123],
|
||||
|
||||
// Object values.
|
||||
...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
|
||||
|
||||
// Intl objects.
|
||||
...[].concat(...intlConstructors.map(ctor => [
|
||||
// Instance of an Intl constructor.
|
||||
new ctor(),
|
||||
|
||||
// Instance of a subclassed Intl constructor.
|
||||
new class extends ctor {},
|
||||
|
||||
// Object inheriting from an Intl constructor prototype.
|
||||
Object.create(ctor.prototype),
|
||||
|
||||
// Intl object not inheriting from its default prototype.
|
||||
Object.setPrototypeOf(new ctor(), Object.prototype),
|
||||
])),
|
||||
];
|
||||
}
|
||||
|
||||
// Invoking [[Call]] for Intl.PluralRules always returns a new PluralRules instance.
|
||||
for (let thisValue of thisValues()) {
|
||||
let obj = Intl.PluralRules.call(thisValue);
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.PluralRules, true);
|
||||
|
||||
// Ensure Intl.[[FallbackSymbol]] wasn't installed on |thisValue|.
|
||||
if (IsObject(thisValue))
|
||||
assertEqArray(Object.getOwnPropertySymbols(thisValue), []);
|
||||
}
|
||||
|
||||
// Intl.PluralRules doesn't use the legacy Intl constructor compromise semantics.
|
||||
for (let thisValue of thisValues()) {
|
||||
// Ensure instanceof operator isn't invoked for Intl.PluralRules.
|
||||
Object.defineProperty(Intl.PluralRules, Symbol.hasInstance, {
|
||||
get() {
|
||||
assertEq(false, true, "@@hasInstance operator called");
|
||||
}, configurable: true
|
||||
});
|
||||
let obj = Intl.PluralRules.call(thisValue);
|
||||
delete Intl.PluralRules[Symbol.hasInstance];
|
||||
assertEq(Object.is(obj, thisValue), false);
|
||||
assertEq(obj instanceof Intl.PluralRules, true);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,69 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Test language dependent special casing with different language tags.
|
||||
for (let locale of ["tr", "TR", "tr-TR", "tr-u-co-search", "tr-x-turkish"]) {
|
||||
assertEq("\u0130".toLocaleLowerCase(locale), "i");
|
||||
assertEq("\u0130".toLocaleLowerCase([locale]), "i");
|
||||
|
||||
// Additional language tags are ignored.
|
||||
assertEq("\u0130".toLocaleLowerCase([locale, "und"]), "i");
|
||||
assertEq("\u0130".toLocaleLowerCase(["und", locale]), "\u0069\u0307");
|
||||
}
|
||||
|
||||
// Ensure "trl" (Traveller Scottish) isn't misrecognized as "tr", even though
|
||||
// both share the same prefix.
|
||||
assertEq("\u0130".toLocaleLowerCase("trl"), "\u0069\u0307");
|
||||
assertEq("\u0130".toLocaleLowerCase(["trl"]), "\u0069\u0307");
|
||||
|
||||
// Language tag is always verified.
|
||||
for (let locale of ["no_locale", "tr-invalid_ext", ["no_locale"], ["en", "no_locale"]]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleLowerCase(locale), RangeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "x".toLocaleLowerCase(locale), RangeError);
|
||||
}
|
||||
|
||||
// The language tag fast-path for String.prototype.toLocaleLowerCase doesn't
|
||||
// trip up on three element private-use only language tags.
|
||||
assertEq("A".toLocaleLowerCase("x-x"), "a");
|
||||
assertEq("A".toLocaleLowerCase("x-0"), "a");
|
||||
|
||||
// No locale argument, undefined as locale, and empty array or array-like all
|
||||
// return the same result. Testing with "a/A" because it has only simple case
|
||||
// mappings.
|
||||
assertEq("A".toLocaleLowerCase(), "a");
|
||||
assertEq("A".toLocaleLowerCase(undefined), "a");
|
||||
assertEq("A".toLocaleLowerCase([]), "a");
|
||||
assertEq("A".toLocaleLowerCase({}), "a");
|
||||
assertEq("A".toLocaleLowerCase({length: 0}), "a");
|
||||
assertEq("A".toLocaleLowerCase({length: -1}), "a");
|
||||
|
||||
// Test with incorrect locale type.
|
||||
for (let locale of [null, 0, Math.PI, NaN, Infinity, true, false, Symbol()]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleLowerCase([locale]), TypeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "A".toLocaleLowerCase([locale]), TypeError);
|
||||
}
|
||||
|
||||
// Primitives are converted with ToObject and then queried for .length property.
|
||||
for (let locale of [null]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleLowerCase([locale]), TypeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "A".toLocaleLowerCase([locale]), TypeError);
|
||||
}
|
||||
// ToLength(ToObject(<primitive>)) returns 0.
|
||||
for (let locale of [0, Math.PI, NaN, Infinity, true, false, Symbol()]) {
|
||||
// Empty input string.
|
||||
assertEq("".toLocaleLowerCase(locale), "");
|
||||
|
||||
// Non-empty input string.
|
||||
assertEq("A".toLocaleLowerCase(locale), "a");
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0, "ok");
|
||||
@@ -0,0 +1,69 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Test language dependent special casing with different language tags.
|
||||
for (let locale of ["lt", "LT", "lt-LT", "lt-u-co-phonebk", "lt-x-lietuva"]) {
|
||||
assertEq("i\u0307".toLocaleUpperCase(locale), "I");
|
||||
assertEq("i\u0307".toLocaleUpperCase([locale]), "I");
|
||||
|
||||
// Additional language tags are ignored.
|
||||
assertEq("i\u0307".toLocaleUpperCase([locale, "und"]), "I");
|
||||
assertEq("i\u0307".toLocaleUpperCase(["und", locale]), "I\u0307");
|
||||
}
|
||||
|
||||
// Ensure "lti" (Leti) isn't misrecognized as "lt", even though both share the
|
||||
// same prefix.
|
||||
assertEq("i\u0307".toLocaleUpperCase("lti"), "I\u0307");
|
||||
assertEq("i\u0307".toLocaleUpperCase(["lti"]), "I\u0307");
|
||||
|
||||
// Language tag is always verified.
|
||||
for (let locale of ["no_locale", "lt-invalid_ext", ["no_locale"], ["en", "no_locale"]]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleUpperCase(locale), RangeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "a".toLocaleUpperCase(locale), RangeError);
|
||||
}
|
||||
|
||||
// The language tag fast-path for String.prototype.toLocaleUpperCase doesn't
|
||||
// trip up on three element private-use only language tags.
|
||||
assertEq("a".toLocaleUpperCase("x-x"), "A");
|
||||
assertEq("a".toLocaleUpperCase("x-0"), "A");
|
||||
|
||||
// No locale argument, undefined as locale, and empty array or array-like all
|
||||
// return the same result. Testing with "a/A" because it has only simple case
|
||||
// mappings.
|
||||
assertEq("a".toLocaleUpperCase(), "A");
|
||||
assertEq("a".toLocaleUpperCase(undefined), "A");
|
||||
assertEq("a".toLocaleUpperCase([]), "A");
|
||||
assertEq("a".toLocaleUpperCase({}), "A");
|
||||
assertEq("a".toLocaleUpperCase({length: 0}), "A");
|
||||
assertEq("a".toLocaleUpperCase({length: -1}), "A");
|
||||
|
||||
// Test with incorrect locale type.
|
||||
for (let locale of [null, 0, Math.PI, NaN, Infinity, true, false, Symbol()]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleUpperCase([locale]), TypeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "a".toLocaleUpperCase([locale]), TypeError);
|
||||
}
|
||||
|
||||
// Primitives are converted with ToObject and then queried for .length property.
|
||||
for (let locale of [null]) {
|
||||
// Empty input string.
|
||||
assertThrowsInstanceOf(() => "".toLocaleUpperCase([locale]), TypeError);
|
||||
|
||||
// Non-empty input string.
|
||||
assertThrowsInstanceOf(() => "a".toLocaleUpperCase([locale]), TypeError);
|
||||
}
|
||||
// ToLength(ToObject(<primitive>)) returns 0.
|
||||
for (let locale of [0, Math.PI, NaN, Infinity, true, false, Symbol()]) {
|
||||
// Empty input string.
|
||||
assertEq("".toLocaleUpperCase(locale), "");
|
||||
|
||||
// Non-empty input string.
|
||||
assertEq("a".toLocaleUpperCase(locale), "A");
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0, "ok");
|
||||
@@ -35,6 +35,9 @@ writeHeaderToLog( SECTION + " "+ TITLE);
|
||||
// Armenian
|
||||
// Range: U+0530 to U+058F
|
||||
for ( var i = 0x0530; i <= 0x058F; i++ ) {
|
||||
// U+0587 (ARMENIAN SMALL LIGATURE ECH YIWN) has special upper casing.
|
||||
if (i == 0x0587) continue;
|
||||
|
||||
var U = new Unicode( i );
|
||||
/*
|
||||
new TestCase( SECTION,
|
||||
|
||||
@@ -5,7 +5,33 @@
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/licenses/publicdomain/
|
||||
*/
|
||||
var onlySpace = String.fromCharCode(0x9, 0xa, 0xb, 0xc, 0xd, 0x20, 0xa0, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000, 0xfeff);
|
||||
var onlySpace = String.fromCharCode(
|
||||
0x0009 /* <control> (CHARACTER TABULATION) */,
|
||||
0x000A /* <control> (LINE FEED (LF)) */,
|
||||
0x000B /* <control> (LINE TABULATION) */,
|
||||
0x000C /* <control> (FORM FEED (FF)) */,
|
||||
0x000D /* <control> (CARRIAGE RETURN (CR)) */,
|
||||
0x0020 /* SPACE */,
|
||||
0x00A0 /* NO-BREAK SPACE (NON-BREAKING SPACE) */,
|
||||
0x1680 /* OGHAM SPACE MARK */,
|
||||
0x2000 /* EN QUAD */,
|
||||
0x2001 /* EM QUAD */,
|
||||
0x2002 /* EN SPACE */,
|
||||
0x2003 /* EM SPACE */,
|
||||
0x2004 /* THREE-PER-EM SPACE */,
|
||||
0x2005 /* FOUR-PER-EM SPACE */,
|
||||
0x2006 /* SIX-PER-EM SPACE */,
|
||||
0x2007 /* FIGURE SPACE */,
|
||||
0x2008 /* PUNCTUATION SPACE */,
|
||||
0x2009 /* THIN SPACE */,
|
||||
0x200A /* HAIR SPACE */,
|
||||
0x2028 /* LINE SEPARATOR */,
|
||||
0x2029 /* PARAGRAPH SEPARATOR */,
|
||||
0x202F /* NARROW NO-BREAK SPACE */,
|
||||
0x205F /* MEDIUM MATHEMATICAL SPACE */,
|
||||
0x3000 /* IDEOGRAPHIC SPACE */,
|
||||
0xFEFF /* ZERO WIDTH NO-BREAK SPACE (BYTE ORDER MARK) */
|
||||
);
|
||||
|
||||
assertEq(onlySpace.trim(), "");
|
||||
assertEq((onlySpace + 'aaaa').trim(), 'aaaa');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,456 +5,456 @@
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/licenses/publicdomain/
|
||||
*/
|
||||
assertEq(String.fromCodePoint(0x10428).toUpperCase().codePointAt(0), 0x10400);
|
||||
assertEq(String.fromCodePoint(0x10429).toUpperCase().codePointAt(0), 0x10401);
|
||||
assertEq(String.fromCodePoint(0x1042a).toUpperCase().codePointAt(0), 0x10402);
|
||||
assertEq(String.fromCodePoint(0x1042b).toUpperCase().codePointAt(0), 0x10403);
|
||||
assertEq(String.fromCodePoint(0x1042c).toUpperCase().codePointAt(0), 0x10404);
|
||||
assertEq(String.fromCodePoint(0x1042d).toUpperCase().codePointAt(0), 0x10405);
|
||||
assertEq(String.fromCodePoint(0x1042e).toUpperCase().codePointAt(0), 0x10406);
|
||||
assertEq(String.fromCodePoint(0x1042f).toUpperCase().codePointAt(0), 0x10407);
|
||||
assertEq(String.fromCodePoint(0x10430).toUpperCase().codePointAt(0), 0x10408);
|
||||
assertEq(String.fromCodePoint(0x10431).toUpperCase().codePointAt(0), 0x10409);
|
||||
assertEq(String.fromCodePoint(0x10432).toUpperCase().codePointAt(0), 0x1040a);
|
||||
assertEq(String.fromCodePoint(0x10433).toUpperCase().codePointAt(0), 0x1040b);
|
||||
assertEq(String.fromCodePoint(0x10434).toUpperCase().codePointAt(0), 0x1040c);
|
||||
assertEq(String.fromCodePoint(0x10435).toUpperCase().codePointAt(0), 0x1040d);
|
||||
assertEq(String.fromCodePoint(0x10436).toUpperCase().codePointAt(0), 0x1040e);
|
||||
assertEq(String.fromCodePoint(0x10437).toUpperCase().codePointAt(0), 0x1040f);
|
||||
assertEq(String.fromCodePoint(0x10438).toUpperCase().codePointAt(0), 0x10410);
|
||||
assertEq(String.fromCodePoint(0x10439).toUpperCase().codePointAt(0), 0x10411);
|
||||
assertEq(String.fromCodePoint(0x1043a).toUpperCase().codePointAt(0), 0x10412);
|
||||
assertEq(String.fromCodePoint(0x1043b).toUpperCase().codePointAt(0), 0x10413);
|
||||
assertEq(String.fromCodePoint(0x1043c).toUpperCase().codePointAt(0), 0x10414);
|
||||
assertEq(String.fromCodePoint(0x1043d).toUpperCase().codePointAt(0), 0x10415);
|
||||
assertEq(String.fromCodePoint(0x1043e).toUpperCase().codePointAt(0), 0x10416);
|
||||
assertEq(String.fromCodePoint(0x1043f).toUpperCase().codePointAt(0), 0x10417);
|
||||
assertEq(String.fromCodePoint(0x10440).toUpperCase().codePointAt(0), 0x10418);
|
||||
assertEq(String.fromCodePoint(0x10441).toUpperCase().codePointAt(0), 0x10419);
|
||||
assertEq(String.fromCodePoint(0x10442).toUpperCase().codePointAt(0), 0x1041a);
|
||||
assertEq(String.fromCodePoint(0x10443).toUpperCase().codePointAt(0), 0x1041b);
|
||||
assertEq(String.fromCodePoint(0x10444).toUpperCase().codePointAt(0), 0x1041c);
|
||||
assertEq(String.fromCodePoint(0x10445).toUpperCase().codePointAt(0), 0x1041d);
|
||||
assertEq(String.fromCodePoint(0x10446).toUpperCase().codePointAt(0), 0x1041e);
|
||||
assertEq(String.fromCodePoint(0x10447).toUpperCase().codePointAt(0), 0x1041f);
|
||||
assertEq(String.fromCodePoint(0x10448).toUpperCase().codePointAt(0), 0x10420);
|
||||
assertEq(String.fromCodePoint(0x10449).toUpperCase().codePointAt(0), 0x10421);
|
||||
assertEq(String.fromCodePoint(0x1044a).toUpperCase().codePointAt(0), 0x10422);
|
||||
assertEq(String.fromCodePoint(0x1044b).toUpperCase().codePointAt(0), 0x10423);
|
||||
assertEq(String.fromCodePoint(0x1044c).toUpperCase().codePointAt(0), 0x10424);
|
||||
assertEq(String.fromCodePoint(0x1044d).toUpperCase().codePointAt(0), 0x10425);
|
||||
assertEq(String.fromCodePoint(0x1044e).toUpperCase().codePointAt(0), 0x10426);
|
||||
assertEq(String.fromCodePoint(0x1044f).toUpperCase().codePointAt(0), 0x10427);
|
||||
assertEq(String.fromCodePoint(0x104d8).toUpperCase().codePointAt(0), 0x104b0);
|
||||
assertEq(String.fromCodePoint(0x104d9).toUpperCase().codePointAt(0), 0x104b1);
|
||||
assertEq(String.fromCodePoint(0x104da).toUpperCase().codePointAt(0), 0x104b2);
|
||||
assertEq(String.fromCodePoint(0x104db).toUpperCase().codePointAt(0), 0x104b3);
|
||||
assertEq(String.fromCodePoint(0x104dc).toUpperCase().codePointAt(0), 0x104b4);
|
||||
assertEq(String.fromCodePoint(0x104dd).toUpperCase().codePointAt(0), 0x104b5);
|
||||
assertEq(String.fromCodePoint(0x104de).toUpperCase().codePointAt(0), 0x104b6);
|
||||
assertEq(String.fromCodePoint(0x104df).toUpperCase().codePointAt(0), 0x104b7);
|
||||
assertEq(String.fromCodePoint(0x104e0).toUpperCase().codePointAt(0), 0x104b8);
|
||||
assertEq(String.fromCodePoint(0x104e1).toUpperCase().codePointAt(0), 0x104b9);
|
||||
assertEq(String.fromCodePoint(0x104e2).toUpperCase().codePointAt(0), 0x104ba);
|
||||
assertEq(String.fromCodePoint(0x104e3).toUpperCase().codePointAt(0), 0x104bb);
|
||||
assertEq(String.fromCodePoint(0x104e4).toUpperCase().codePointAt(0), 0x104bc);
|
||||
assertEq(String.fromCodePoint(0x104e5).toUpperCase().codePointAt(0), 0x104bd);
|
||||
assertEq(String.fromCodePoint(0x104e6).toUpperCase().codePointAt(0), 0x104be);
|
||||
assertEq(String.fromCodePoint(0x104e7).toUpperCase().codePointAt(0), 0x104bf);
|
||||
assertEq(String.fromCodePoint(0x104e8).toUpperCase().codePointAt(0), 0x104c0);
|
||||
assertEq(String.fromCodePoint(0x104e9).toUpperCase().codePointAt(0), 0x104c1);
|
||||
assertEq(String.fromCodePoint(0x104ea).toUpperCase().codePointAt(0), 0x104c2);
|
||||
assertEq(String.fromCodePoint(0x104eb).toUpperCase().codePointAt(0), 0x104c3);
|
||||
assertEq(String.fromCodePoint(0x104ec).toUpperCase().codePointAt(0), 0x104c4);
|
||||
assertEq(String.fromCodePoint(0x104ed).toUpperCase().codePointAt(0), 0x104c5);
|
||||
assertEq(String.fromCodePoint(0x104ee).toUpperCase().codePointAt(0), 0x104c6);
|
||||
assertEq(String.fromCodePoint(0x104ef).toUpperCase().codePointAt(0), 0x104c7);
|
||||
assertEq(String.fromCodePoint(0x104f0).toUpperCase().codePointAt(0), 0x104c8);
|
||||
assertEq(String.fromCodePoint(0x104f1).toUpperCase().codePointAt(0), 0x104c9);
|
||||
assertEq(String.fromCodePoint(0x104f2).toUpperCase().codePointAt(0), 0x104ca);
|
||||
assertEq(String.fromCodePoint(0x104f3).toUpperCase().codePointAt(0), 0x104cb);
|
||||
assertEq(String.fromCodePoint(0x104f4).toUpperCase().codePointAt(0), 0x104cc);
|
||||
assertEq(String.fromCodePoint(0x104f5).toUpperCase().codePointAt(0), 0x104cd);
|
||||
assertEq(String.fromCodePoint(0x104f6).toUpperCase().codePointAt(0), 0x104ce);
|
||||
assertEq(String.fromCodePoint(0x104f7).toUpperCase().codePointAt(0), 0x104cf);
|
||||
assertEq(String.fromCodePoint(0x104f8).toUpperCase().codePointAt(0), 0x104d0);
|
||||
assertEq(String.fromCodePoint(0x104f9).toUpperCase().codePointAt(0), 0x104d1);
|
||||
assertEq(String.fromCodePoint(0x104fa).toUpperCase().codePointAt(0), 0x104d2);
|
||||
assertEq(String.fromCodePoint(0x104fb).toUpperCase().codePointAt(0), 0x104d3);
|
||||
assertEq(String.fromCodePoint(0x10cc0).toUpperCase().codePointAt(0), 0x10c80);
|
||||
assertEq(String.fromCodePoint(0x10cc1).toUpperCase().codePointAt(0), 0x10c81);
|
||||
assertEq(String.fromCodePoint(0x10cc2).toUpperCase().codePointAt(0), 0x10c82);
|
||||
assertEq(String.fromCodePoint(0x10cc3).toUpperCase().codePointAt(0), 0x10c83);
|
||||
assertEq(String.fromCodePoint(0x10cc4).toUpperCase().codePointAt(0), 0x10c84);
|
||||
assertEq(String.fromCodePoint(0x10cc5).toUpperCase().codePointAt(0), 0x10c85);
|
||||
assertEq(String.fromCodePoint(0x10cc6).toUpperCase().codePointAt(0), 0x10c86);
|
||||
assertEq(String.fromCodePoint(0x10cc7).toUpperCase().codePointAt(0), 0x10c87);
|
||||
assertEq(String.fromCodePoint(0x10cc8).toUpperCase().codePointAt(0), 0x10c88);
|
||||
assertEq(String.fromCodePoint(0x10cc9).toUpperCase().codePointAt(0), 0x10c89);
|
||||
assertEq(String.fromCodePoint(0x10cca).toUpperCase().codePointAt(0), 0x10c8a);
|
||||
assertEq(String.fromCodePoint(0x10ccb).toUpperCase().codePointAt(0), 0x10c8b);
|
||||
assertEq(String.fromCodePoint(0x10ccc).toUpperCase().codePointAt(0), 0x10c8c);
|
||||
assertEq(String.fromCodePoint(0x10ccd).toUpperCase().codePointAt(0), 0x10c8d);
|
||||
assertEq(String.fromCodePoint(0x10cce).toUpperCase().codePointAt(0), 0x10c8e);
|
||||
assertEq(String.fromCodePoint(0x10ccf).toUpperCase().codePointAt(0), 0x10c8f);
|
||||
assertEq(String.fromCodePoint(0x10cd0).toUpperCase().codePointAt(0), 0x10c90);
|
||||
assertEq(String.fromCodePoint(0x10cd1).toUpperCase().codePointAt(0), 0x10c91);
|
||||
assertEq(String.fromCodePoint(0x10cd2).toUpperCase().codePointAt(0), 0x10c92);
|
||||
assertEq(String.fromCodePoint(0x10cd3).toUpperCase().codePointAt(0), 0x10c93);
|
||||
assertEq(String.fromCodePoint(0x10cd4).toUpperCase().codePointAt(0), 0x10c94);
|
||||
assertEq(String.fromCodePoint(0x10cd5).toUpperCase().codePointAt(0), 0x10c95);
|
||||
assertEq(String.fromCodePoint(0x10cd6).toUpperCase().codePointAt(0), 0x10c96);
|
||||
assertEq(String.fromCodePoint(0x10cd7).toUpperCase().codePointAt(0), 0x10c97);
|
||||
assertEq(String.fromCodePoint(0x10cd8).toUpperCase().codePointAt(0), 0x10c98);
|
||||
assertEq(String.fromCodePoint(0x10cd9).toUpperCase().codePointAt(0), 0x10c99);
|
||||
assertEq(String.fromCodePoint(0x10cda).toUpperCase().codePointAt(0), 0x10c9a);
|
||||
assertEq(String.fromCodePoint(0x10cdb).toUpperCase().codePointAt(0), 0x10c9b);
|
||||
assertEq(String.fromCodePoint(0x10cdc).toUpperCase().codePointAt(0), 0x10c9c);
|
||||
assertEq(String.fromCodePoint(0x10cdd).toUpperCase().codePointAt(0), 0x10c9d);
|
||||
assertEq(String.fromCodePoint(0x10cde).toUpperCase().codePointAt(0), 0x10c9e);
|
||||
assertEq(String.fromCodePoint(0x10cdf).toUpperCase().codePointAt(0), 0x10c9f);
|
||||
assertEq(String.fromCodePoint(0x10ce0).toUpperCase().codePointAt(0), 0x10ca0);
|
||||
assertEq(String.fromCodePoint(0x10ce1).toUpperCase().codePointAt(0), 0x10ca1);
|
||||
assertEq(String.fromCodePoint(0x10ce2).toUpperCase().codePointAt(0), 0x10ca2);
|
||||
assertEq(String.fromCodePoint(0x10ce3).toUpperCase().codePointAt(0), 0x10ca3);
|
||||
assertEq(String.fromCodePoint(0x10ce4).toUpperCase().codePointAt(0), 0x10ca4);
|
||||
assertEq(String.fromCodePoint(0x10ce5).toUpperCase().codePointAt(0), 0x10ca5);
|
||||
assertEq(String.fromCodePoint(0x10ce6).toUpperCase().codePointAt(0), 0x10ca6);
|
||||
assertEq(String.fromCodePoint(0x10ce7).toUpperCase().codePointAt(0), 0x10ca7);
|
||||
assertEq(String.fromCodePoint(0x10ce8).toUpperCase().codePointAt(0), 0x10ca8);
|
||||
assertEq(String.fromCodePoint(0x10ce9).toUpperCase().codePointAt(0), 0x10ca9);
|
||||
assertEq(String.fromCodePoint(0x10cea).toUpperCase().codePointAt(0), 0x10caa);
|
||||
assertEq(String.fromCodePoint(0x10ceb).toUpperCase().codePointAt(0), 0x10cab);
|
||||
assertEq(String.fromCodePoint(0x10cec).toUpperCase().codePointAt(0), 0x10cac);
|
||||
assertEq(String.fromCodePoint(0x10ced).toUpperCase().codePointAt(0), 0x10cad);
|
||||
assertEq(String.fromCodePoint(0x10cee).toUpperCase().codePointAt(0), 0x10cae);
|
||||
assertEq(String.fromCodePoint(0x10cef).toUpperCase().codePointAt(0), 0x10caf);
|
||||
assertEq(String.fromCodePoint(0x10cf0).toUpperCase().codePointAt(0), 0x10cb0);
|
||||
assertEq(String.fromCodePoint(0x10cf1).toUpperCase().codePointAt(0), 0x10cb1);
|
||||
assertEq(String.fromCodePoint(0x10cf2).toUpperCase().codePointAt(0), 0x10cb2);
|
||||
assertEq(String.fromCodePoint(0x118c0).toUpperCase().codePointAt(0), 0x118a0);
|
||||
assertEq(String.fromCodePoint(0x118c1).toUpperCase().codePointAt(0), 0x118a1);
|
||||
assertEq(String.fromCodePoint(0x118c2).toUpperCase().codePointAt(0), 0x118a2);
|
||||
assertEq(String.fromCodePoint(0x118c3).toUpperCase().codePointAt(0), 0x118a3);
|
||||
assertEq(String.fromCodePoint(0x118c4).toUpperCase().codePointAt(0), 0x118a4);
|
||||
assertEq(String.fromCodePoint(0x118c5).toUpperCase().codePointAt(0), 0x118a5);
|
||||
assertEq(String.fromCodePoint(0x118c6).toUpperCase().codePointAt(0), 0x118a6);
|
||||
assertEq(String.fromCodePoint(0x118c7).toUpperCase().codePointAt(0), 0x118a7);
|
||||
assertEq(String.fromCodePoint(0x118c8).toUpperCase().codePointAt(0), 0x118a8);
|
||||
assertEq(String.fromCodePoint(0x118c9).toUpperCase().codePointAt(0), 0x118a9);
|
||||
assertEq(String.fromCodePoint(0x118ca).toUpperCase().codePointAt(0), 0x118aa);
|
||||
assertEq(String.fromCodePoint(0x118cb).toUpperCase().codePointAt(0), 0x118ab);
|
||||
assertEq(String.fromCodePoint(0x118cc).toUpperCase().codePointAt(0), 0x118ac);
|
||||
assertEq(String.fromCodePoint(0x118cd).toUpperCase().codePointAt(0), 0x118ad);
|
||||
assertEq(String.fromCodePoint(0x118ce).toUpperCase().codePointAt(0), 0x118ae);
|
||||
assertEq(String.fromCodePoint(0x118cf).toUpperCase().codePointAt(0), 0x118af);
|
||||
assertEq(String.fromCodePoint(0x118d0).toUpperCase().codePointAt(0), 0x118b0);
|
||||
assertEq(String.fromCodePoint(0x118d1).toUpperCase().codePointAt(0), 0x118b1);
|
||||
assertEq(String.fromCodePoint(0x118d2).toUpperCase().codePointAt(0), 0x118b2);
|
||||
assertEq(String.fromCodePoint(0x118d3).toUpperCase().codePointAt(0), 0x118b3);
|
||||
assertEq(String.fromCodePoint(0x118d4).toUpperCase().codePointAt(0), 0x118b4);
|
||||
assertEq(String.fromCodePoint(0x118d5).toUpperCase().codePointAt(0), 0x118b5);
|
||||
assertEq(String.fromCodePoint(0x118d6).toUpperCase().codePointAt(0), 0x118b6);
|
||||
assertEq(String.fromCodePoint(0x118d7).toUpperCase().codePointAt(0), 0x118b7);
|
||||
assertEq(String.fromCodePoint(0x118d8).toUpperCase().codePointAt(0), 0x118b8);
|
||||
assertEq(String.fromCodePoint(0x118d9).toUpperCase().codePointAt(0), 0x118b9);
|
||||
assertEq(String.fromCodePoint(0x118da).toUpperCase().codePointAt(0), 0x118ba);
|
||||
assertEq(String.fromCodePoint(0x118db).toUpperCase().codePointAt(0), 0x118bb);
|
||||
assertEq(String.fromCodePoint(0x118dc).toUpperCase().codePointAt(0), 0x118bc);
|
||||
assertEq(String.fromCodePoint(0x118dd).toUpperCase().codePointAt(0), 0x118bd);
|
||||
assertEq(String.fromCodePoint(0x118de).toUpperCase().codePointAt(0), 0x118be);
|
||||
assertEq(String.fromCodePoint(0x118df).toUpperCase().codePointAt(0), 0x118bf);
|
||||
assertEq(String.fromCodePoint(0x16e60).toUpperCase().codePointAt(0), 0x16e40);
|
||||
assertEq(String.fromCodePoint(0x16e61).toUpperCase().codePointAt(0), 0x16e41);
|
||||
assertEq(String.fromCodePoint(0x16e62).toUpperCase().codePointAt(0), 0x16e42);
|
||||
assertEq(String.fromCodePoint(0x16e63).toUpperCase().codePointAt(0), 0x16e43);
|
||||
assertEq(String.fromCodePoint(0x16e64).toUpperCase().codePointAt(0), 0x16e44);
|
||||
assertEq(String.fromCodePoint(0x16e65).toUpperCase().codePointAt(0), 0x16e45);
|
||||
assertEq(String.fromCodePoint(0x16e66).toUpperCase().codePointAt(0), 0x16e46);
|
||||
assertEq(String.fromCodePoint(0x16e67).toUpperCase().codePointAt(0), 0x16e47);
|
||||
assertEq(String.fromCodePoint(0x16e68).toUpperCase().codePointAt(0), 0x16e48);
|
||||
assertEq(String.fromCodePoint(0x16e69).toUpperCase().codePointAt(0), 0x16e49);
|
||||
assertEq(String.fromCodePoint(0x16e6a).toUpperCase().codePointAt(0), 0x16e4a);
|
||||
assertEq(String.fromCodePoint(0x16e6b).toUpperCase().codePointAt(0), 0x16e4b);
|
||||
assertEq(String.fromCodePoint(0x16e6c).toUpperCase().codePointAt(0), 0x16e4c);
|
||||
assertEq(String.fromCodePoint(0x16e6d).toUpperCase().codePointAt(0), 0x16e4d);
|
||||
assertEq(String.fromCodePoint(0x16e6e).toUpperCase().codePointAt(0), 0x16e4e);
|
||||
assertEq(String.fromCodePoint(0x16e6f).toUpperCase().codePointAt(0), 0x16e4f);
|
||||
assertEq(String.fromCodePoint(0x16e70).toUpperCase().codePointAt(0), 0x16e50);
|
||||
assertEq(String.fromCodePoint(0x16e71).toUpperCase().codePointAt(0), 0x16e51);
|
||||
assertEq(String.fromCodePoint(0x16e72).toUpperCase().codePointAt(0), 0x16e52);
|
||||
assertEq(String.fromCodePoint(0x16e73).toUpperCase().codePointAt(0), 0x16e53);
|
||||
assertEq(String.fromCodePoint(0x16e74).toUpperCase().codePointAt(0), 0x16e54);
|
||||
assertEq(String.fromCodePoint(0x16e75).toUpperCase().codePointAt(0), 0x16e55);
|
||||
assertEq(String.fromCodePoint(0x16e76).toUpperCase().codePointAt(0), 0x16e56);
|
||||
assertEq(String.fromCodePoint(0x16e77).toUpperCase().codePointAt(0), 0x16e57);
|
||||
assertEq(String.fromCodePoint(0x16e78).toUpperCase().codePointAt(0), 0x16e58);
|
||||
assertEq(String.fromCodePoint(0x16e79).toUpperCase().codePointAt(0), 0x16e59);
|
||||
assertEq(String.fromCodePoint(0x16e7a).toUpperCase().codePointAt(0), 0x16e5a);
|
||||
assertEq(String.fromCodePoint(0x16e7b).toUpperCase().codePointAt(0), 0x16e5b);
|
||||
assertEq(String.fromCodePoint(0x16e7c).toUpperCase().codePointAt(0), 0x16e5c);
|
||||
assertEq(String.fromCodePoint(0x16e7d).toUpperCase().codePointAt(0), 0x16e5d);
|
||||
assertEq(String.fromCodePoint(0x16e7e).toUpperCase().codePointAt(0), 0x16e5e);
|
||||
assertEq(String.fromCodePoint(0x16e7f).toUpperCase().codePointAt(0), 0x16e5f);
|
||||
assertEq(String.fromCodePoint(0x1e922).toUpperCase().codePointAt(0), 0x1e900);
|
||||
assertEq(String.fromCodePoint(0x1e923).toUpperCase().codePointAt(0), 0x1e901);
|
||||
assertEq(String.fromCodePoint(0x1e924).toUpperCase().codePointAt(0), 0x1e902);
|
||||
assertEq(String.fromCodePoint(0x1e925).toUpperCase().codePointAt(0), 0x1e903);
|
||||
assertEq(String.fromCodePoint(0x1e926).toUpperCase().codePointAt(0), 0x1e904);
|
||||
assertEq(String.fromCodePoint(0x1e927).toUpperCase().codePointAt(0), 0x1e905);
|
||||
assertEq(String.fromCodePoint(0x1e928).toUpperCase().codePointAt(0), 0x1e906);
|
||||
assertEq(String.fromCodePoint(0x1e929).toUpperCase().codePointAt(0), 0x1e907);
|
||||
assertEq(String.fromCodePoint(0x1e92a).toUpperCase().codePointAt(0), 0x1e908);
|
||||
assertEq(String.fromCodePoint(0x1e92b).toUpperCase().codePointAt(0), 0x1e909);
|
||||
assertEq(String.fromCodePoint(0x1e92c).toUpperCase().codePointAt(0), 0x1e90a);
|
||||
assertEq(String.fromCodePoint(0x1e92d).toUpperCase().codePointAt(0), 0x1e90b);
|
||||
assertEq(String.fromCodePoint(0x1e92e).toUpperCase().codePointAt(0), 0x1e90c);
|
||||
assertEq(String.fromCodePoint(0x1e92f).toUpperCase().codePointAt(0), 0x1e90d);
|
||||
assertEq(String.fromCodePoint(0x1e930).toUpperCase().codePointAt(0), 0x1e90e);
|
||||
assertEq(String.fromCodePoint(0x1e931).toUpperCase().codePointAt(0), 0x1e90f);
|
||||
assertEq(String.fromCodePoint(0x1e932).toUpperCase().codePointAt(0), 0x1e910);
|
||||
assertEq(String.fromCodePoint(0x1e933).toUpperCase().codePointAt(0), 0x1e911);
|
||||
assertEq(String.fromCodePoint(0x1e934).toUpperCase().codePointAt(0), 0x1e912);
|
||||
assertEq(String.fromCodePoint(0x1e935).toUpperCase().codePointAt(0), 0x1e913);
|
||||
assertEq(String.fromCodePoint(0x1e936).toUpperCase().codePointAt(0), 0x1e914);
|
||||
assertEq(String.fromCodePoint(0x1e937).toUpperCase().codePointAt(0), 0x1e915);
|
||||
assertEq(String.fromCodePoint(0x1e938).toUpperCase().codePointAt(0), 0x1e916);
|
||||
assertEq(String.fromCodePoint(0x1e939).toUpperCase().codePointAt(0), 0x1e917);
|
||||
assertEq(String.fromCodePoint(0x1e93a).toUpperCase().codePointAt(0), 0x1e918);
|
||||
assertEq(String.fromCodePoint(0x1e93b).toUpperCase().codePointAt(0), 0x1e919);
|
||||
assertEq(String.fromCodePoint(0x1e93c).toUpperCase().codePointAt(0), 0x1e91a);
|
||||
assertEq(String.fromCodePoint(0x1e93d).toUpperCase().codePointAt(0), 0x1e91b);
|
||||
assertEq(String.fromCodePoint(0x1e93e).toUpperCase().codePointAt(0), 0x1e91c);
|
||||
assertEq(String.fromCodePoint(0x1e93f).toUpperCase().codePointAt(0), 0x1e91d);
|
||||
assertEq(String.fromCodePoint(0x1e940).toUpperCase().codePointAt(0), 0x1e91e);
|
||||
assertEq(String.fromCodePoint(0x1e941).toUpperCase().codePointAt(0), 0x1e91f);
|
||||
assertEq(String.fromCodePoint(0x1e942).toUpperCase().codePointAt(0), 0x1e920);
|
||||
assertEq(String.fromCodePoint(0x1e943).toUpperCase().codePointAt(0), 0x1e921);
|
||||
assertEq(String.fromCodePoint(0x10400).toLowerCase().codePointAt(0), 0x10428);
|
||||
assertEq(String.fromCodePoint(0x10401).toLowerCase().codePointAt(0), 0x10429);
|
||||
assertEq(String.fromCodePoint(0x10402).toLowerCase().codePointAt(0), 0x1042a);
|
||||
assertEq(String.fromCodePoint(0x10403).toLowerCase().codePointAt(0), 0x1042b);
|
||||
assertEq(String.fromCodePoint(0x10404).toLowerCase().codePointAt(0), 0x1042c);
|
||||
assertEq(String.fromCodePoint(0x10405).toLowerCase().codePointAt(0), 0x1042d);
|
||||
assertEq(String.fromCodePoint(0x10406).toLowerCase().codePointAt(0), 0x1042e);
|
||||
assertEq(String.fromCodePoint(0x10407).toLowerCase().codePointAt(0), 0x1042f);
|
||||
assertEq(String.fromCodePoint(0x10408).toLowerCase().codePointAt(0), 0x10430);
|
||||
assertEq(String.fromCodePoint(0x10409).toLowerCase().codePointAt(0), 0x10431);
|
||||
assertEq(String.fromCodePoint(0x1040a).toLowerCase().codePointAt(0), 0x10432);
|
||||
assertEq(String.fromCodePoint(0x1040b).toLowerCase().codePointAt(0), 0x10433);
|
||||
assertEq(String.fromCodePoint(0x1040c).toLowerCase().codePointAt(0), 0x10434);
|
||||
assertEq(String.fromCodePoint(0x1040d).toLowerCase().codePointAt(0), 0x10435);
|
||||
assertEq(String.fromCodePoint(0x1040e).toLowerCase().codePointAt(0), 0x10436);
|
||||
assertEq(String.fromCodePoint(0x1040f).toLowerCase().codePointAt(0), 0x10437);
|
||||
assertEq(String.fromCodePoint(0x10410).toLowerCase().codePointAt(0), 0x10438);
|
||||
assertEq(String.fromCodePoint(0x10411).toLowerCase().codePointAt(0), 0x10439);
|
||||
assertEq(String.fromCodePoint(0x10412).toLowerCase().codePointAt(0), 0x1043a);
|
||||
assertEq(String.fromCodePoint(0x10413).toLowerCase().codePointAt(0), 0x1043b);
|
||||
assertEq(String.fromCodePoint(0x10414).toLowerCase().codePointAt(0), 0x1043c);
|
||||
assertEq(String.fromCodePoint(0x10415).toLowerCase().codePointAt(0), 0x1043d);
|
||||
assertEq(String.fromCodePoint(0x10416).toLowerCase().codePointAt(0), 0x1043e);
|
||||
assertEq(String.fromCodePoint(0x10417).toLowerCase().codePointAt(0), 0x1043f);
|
||||
assertEq(String.fromCodePoint(0x10418).toLowerCase().codePointAt(0), 0x10440);
|
||||
assertEq(String.fromCodePoint(0x10419).toLowerCase().codePointAt(0), 0x10441);
|
||||
assertEq(String.fromCodePoint(0x1041a).toLowerCase().codePointAt(0), 0x10442);
|
||||
assertEq(String.fromCodePoint(0x1041b).toLowerCase().codePointAt(0), 0x10443);
|
||||
assertEq(String.fromCodePoint(0x1041c).toLowerCase().codePointAt(0), 0x10444);
|
||||
assertEq(String.fromCodePoint(0x1041d).toLowerCase().codePointAt(0), 0x10445);
|
||||
assertEq(String.fromCodePoint(0x1041e).toLowerCase().codePointAt(0), 0x10446);
|
||||
assertEq(String.fromCodePoint(0x1041f).toLowerCase().codePointAt(0), 0x10447);
|
||||
assertEq(String.fromCodePoint(0x10420).toLowerCase().codePointAt(0), 0x10448);
|
||||
assertEq(String.fromCodePoint(0x10421).toLowerCase().codePointAt(0), 0x10449);
|
||||
assertEq(String.fromCodePoint(0x10422).toLowerCase().codePointAt(0), 0x1044a);
|
||||
assertEq(String.fromCodePoint(0x10423).toLowerCase().codePointAt(0), 0x1044b);
|
||||
assertEq(String.fromCodePoint(0x10424).toLowerCase().codePointAt(0), 0x1044c);
|
||||
assertEq(String.fromCodePoint(0x10425).toLowerCase().codePointAt(0), 0x1044d);
|
||||
assertEq(String.fromCodePoint(0x10426).toLowerCase().codePointAt(0), 0x1044e);
|
||||
assertEq(String.fromCodePoint(0x10427).toLowerCase().codePointAt(0), 0x1044f);
|
||||
assertEq(String.fromCodePoint(0x104b0).toLowerCase().codePointAt(0), 0x104d8);
|
||||
assertEq(String.fromCodePoint(0x104b1).toLowerCase().codePointAt(0), 0x104d9);
|
||||
assertEq(String.fromCodePoint(0x104b2).toLowerCase().codePointAt(0), 0x104da);
|
||||
assertEq(String.fromCodePoint(0x104b3).toLowerCase().codePointAt(0), 0x104db);
|
||||
assertEq(String.fromCodePoint(0x104b4).toLowerCase().codePointAt(0), 0x104dc);
|
||||
assertEq(String.fromCodePoint(0x104b5).toLowerCase().codePointAt(0), 0x104dd);
|
||||
assertEq(String.fromCodePoint(0x104b6).toLowerCase().codePointAt(0), 0x104de);
|
||||
assertEq(String.fromCodePoint(0x104b7).toLowerCase().codePointAt(0), 0x104df);
|
||||
assertEq(String.fromCodePoint(0x104b8).toLowerCase().codePointAt(0), 0x104e0);
|
||||
assertEq(String.fromCodePoint(0x104b9).toLowerCase().codePointAt(0), 0x104e1);
|
||||
assertEq(String.fromCodePoint(0x104ba).toLowerCase().codePointAt(0), 0x104e2);
|
||||
assertEq(String.fromCodePoint(0x104bb).toLowerCase().codePointAt(0), 0x104e3);
|
||||
assertEq(String.fromCodePoint(0x104bc).toLowerCase().codePointAt(0), 0x104e4);
|
||||
assertEq(String.fromCodePoint(0x104bd).toLowerCase().codePointAt(0), 0x104e5);
|
||||
assertEq(String.fromCodePoint(0x104be).toLowerCase().codePointAt(0), 0x104e6);
|
||||
assertEq(String.fromCodePoint(0x104bf).toLowerCase().codePointAt(0), 0x104e7);
|
||||
assertEq(String.fromCodePoint(0x104c0).toLowerCase().codePointAt(0), 0x104e8);
|
||||
assertEq(String.fromCodePoint(0x104c1).toLowerCase().codePointAt(0), 0x104e9);
|
||||
assertEq(String.fromCodePoint(0x104c2).toLowerCase().codePointAt(0), 0x104ea);
|
||||
assertEq(String.fromCodePoint(0x104c3).toLowerCase().codePointAt(0), 0x104eb);
|
||||
assertEq(String.fromCodePoint(0x104c4).toLowerCase().codePointAt(0), 0x104ec);
|
||||
assertEq(String.fromCodePoint(0x104c5).toLowerCase().codePointAt(0), 0x104ed);
|
||||
assertEq(String.fromCodePoint(0x104c6).toLowerCase().codePointAt(0), 0x104ee);
|
||||
assertEq(String.fromCodePoint(0x104c7).toLowerCase().codePointAt(0), 0x104ef);
|
||||
assertEq(String.fromCodePoint(0x104c8).toLowerCase().codePointAt(0), 0x104f0);
|
||||
assertEq(String.fromCodePoint(0x104c9).toLowerCase().codePointAt(0), 0x104f1);
|
||||
assertEq(String.fromCodePoint(0x104ca).toLowerCase().codePointAt(0), 0x104f2);
|
||||
assertEq(String.fromCodePoint(0x104cb).toLowerCase().codePointAt(0), 0x104f3);
|
||||
assertEq(String.fromCodePoint(0x104cc).toLowerCase().codePointAt(0), 0x104f4);
|
||||
assertEq(String.fromCodePoint(0x104cd).toLowerCase().codePointAt(0), 0x104f5);
|
||||
assertEq(String.fromCodePoint(0x104ce).toLowerCase().codePointAt(0), 0x104f6);
|
||||
assertEq(String.fromCodePoint(0x104cf).toLowerCase().codePointAt(0), 0x104f7);
|
||||
assertEq(String.fromCodePoint(0x104d0).toLowerCase().codePointAt(0), 0x104f8);
|
||||
assertEq(String.fromCodePoint(0x104d1).toLowerCase().codePointAt(0), 0x104f9);
|
||||
assertEq(String.fromCodePoint(0x104d2).toLowerCase().codePointAt(0), 0x104fa);
|
||||
assertEq(String.fromCodePoint(0x104d3).toLowerCase().codePointAt(0), 0x104fb);
|
||||
assertEq(String.fromCodePoint(0x10c80).toLowerCase().codePointAt(0), 0x10cc0);
|
||||
assertEq(String.fromCodePoint(0x10c81).toLowerCase().codePointAt(0), 0x10cc1);
|
||||
assertEq(String.fromCodePoint(0x10c82).toLowerCase().codePointAt(0), 0x10cc2);
|
||||
assertEq(String.fromCodePoint(0x10c83).toLowerCase().codePointAt(0), 0x10cc3);
|
||||
assertEq(String.fromCodePoint(0x10c84).toLowerCase().codePointAt(0), 0x10cc4);
|
||||
assertEq(String.fromCodePoint(0x10c85).toLowerCase().codePointAt(0), 0x10cc5);
|
||||
assertEq(String.fromCodePoint(0x10c86).toLowerCase().codePointAt(0), 0x10cc6);
|
||||
assertEq(String.fromCodePoint(0x10c87).toLowerCase().codePointAt(0), 0x10cc7);
|
||||
assertEq(String.fromCodePoint(0x10c88).toLowerCase().codePointAt(0), 0x10cc8);
|
||||
assertEq(String.fromCodePoint(0x10c89).toLowerCase().codePointAt(0), 0x10cc9);
|
||||
assertEq(String.fromCodePoint(0x10c8a).toLowerCase().codePointAt(0), 0x10cca);
|
||||
assertEq(String.fromCodePoint(0x10c8b).toLowerCase().codePointAt(0), 0x10ccb);
|
||||
assertEq(String.fromCodePoint(0x10c8c).toLowerCase().codePointAt(0), 0x10ccc);
|
||||
assertEq(String.fromCodePoint(0x10c8d).toLowerCase().codePointAt(0), 0x10ccd);
|
||||
assertEq(String.fromCodePoint(0x10c8e).toLowerCase().codePointAt(0), 0x10cce);
|
||||
assertEq(String.fromCodePoint(0x10c8f).toLowerCase().codePointAt(0), 0x10ccf);
|
||||
assertEq(String.fromCodePoint(0x10c90).toLowerCase().codePointAt(0), 0x10cd0);
|
||||
assertEq(String.fromCodePoint(0x10c91).toLowerCase().codePointAt(0), 0x10cd1);
|
||||
assertEq(String.fromCodePoint(0x10c92).toLowerCase().codePointAt(0), 0x10cd2);
|
||||
assertEq(String.fromCodePoint(0x10c93).toLowerCase().codePointAt(0), 0x10cd3);
|
||||
assertEq(String.fromCodePoint(0x10c94).toLowerCase().codePointAt(0), 0x10cd4);
|
||||
assertEq(String.fromCodePoint(0x10c95).toLowerCase().codePointAt(0), 0x10cd5);
|
||||
assertEq(String.fromCodePoint(0x10c96).toLowerCase().codePointAt(0), 0x10cd6);
|
||||
assertEq(String.fromCodePoint(0x10c97).toLowerCase().codePointAt(0), 0x10cd7);
|
||||
assertEq(String.fromCodePoint(0x10c98).toLowerCase().codePointAt(0), 0x10cd8);
|
||||
assertEq(String.fromCodePoint(0x10c99).toLowerCase().codePointAt(0), 0x10cd9);
|
||||
assertEq(String.fromCodePoint(0x10c9a).toLowerCase().codePointAt(0), 0x10cda);
|
||||
assertEq(String.fromCodePoint(0x10c9b).toLowerCase().codePointAt(0), 0x10cdb);
|
||||
assertEq(String.fromCodePoint(0x10c9c).toLowerCase().codePointAt(0), 0x10cdc);
|
||||
assertEq(String.fromCodePoint(0x10c9d).toLowerCase().codePointAt(0), 0x10cdd);
|
||||
assertEq(String.fromCodePoint(0x10c9e).toLowerCase().codePointAt(0), 0x10cde);
|
||||
assertEq(String.fromCodePoint(0x10c9f).toLowerCase().codePointAt(0), 0x10cdf);
|
||||
assertEq(String.fromCodePoint(0x10ca0).toLowerCase().codePointAt(0), 0x10ce0);
|
||||
assertEq(String.fromCodePoint(0x10ca1).toLowerCase().codePointAt(0), 0x10ce1);
|
||||
assertEq(String.fromCodePoint(0x10ca2).toLowerCase().codePointAt(0), 0x10ce2);
|
||||
assertEq(String.fromCodePoint(0x10ca3).toLowerCase().codePointAt(0), 0x10ce3);
|
||||
assertEq(String.fromCodePoint(0x10ca4).toLowerCase().codePointAt(0), 0x10ce4);
|
||||
assertEq(String.fromCodePoint(0x10ca5).toLowerCase().codePointAt(0), 0x10ce5);
|
||||
assertEq(String.fromCodePoint(0x10ca6).toLowerCase().codePointAt(0), 0x10ce6);
|
||||
assertEq(String.fromCodePoint(0x10ca7).toLowerCase().codePointAt(0), 0x10ce7);
|
||||
assertEq(String.fromCodePoint(0x10ca8).toLowerCase().codePointAt(0), 0x10ce8);
|
||||
assertEq(String.fromCodePoint(0x10ca9).toLowerCase().codePointAt(0), 0x10ce9);
|
||||
assertEq(String.fromCodePoint(0x10caa).toLowerCase().codePointAt(0), 0x10cea);
|
||||
assertEq(String.fromCodePoint(0x10cab).toLowerCase().codePointAt(0), 0x10ceb);
|
||||
assertEq(String.fromCodePoint(0x10cac).toLowerCase().codePointAt(0), 0x10cec);
|
||||
assertEq(String.fromCodePoint(0x10cad).toLowerCase().codePointAt(0), 0x10ced);
|
||||
assertEq(String.fromCodePoint(0x10cae).toLowerCase().codePointAt(0), 0x10cee);
|
||||
assertEq(String.fromCodePoint(0x10caf).toLowerCase().codePointAt(0), 0x10cef);
|
||||
assertEq(String.fromCodePoint(0x10cb0).toLowerCase().codePointAt(0), 0x10cf0);
|
||||
assertEq(String.fromCodePoint(0x10cb1).toLowerCase().codePointAt(0), 0x10cf1);
|
||||
assertEq(String.fromCodePoint(0x10cb2).toLowerCase().codePointAt(0), 0x10cf2);
|
||||
assertEq(String.fromCodePoint(0x118a0).toLowerCase().codePointAt(0), 0x118c0);
|
||||
assertEq(String.fromCodePoint(0x118a1).toLowerCase().codePointAt(0), 0x118c1);
|
||||
assertEq(String.fromCodePoint(0x118a2).toLowerCase().codePointAt(0), 0x118c2);
|
||||
assertEq(String.fromCodePoint(0x118a3).toLowerCase().codePointAt(0), 0x118c3);
|
||||
assertEq(String.fromCodePoint(0x118a4).toLowerCase().codePointAt(0), 0x118c4);
|
||||
assertEq(String.fromCodePoint(0x118a5).toLowerCase().codePointAt(0), 0x118c5);
|
||||
assertEq(String.fromCodePoint(0x118a6).toLowerCase().codePointAt(0), 0x118c6);
|
||||
assertEq(String.fromCodePoint(0x118a7).toLowerCase().codePointAt(0), 0x118c7);
|
||||
assertEq(String.fromCodePoint(0x118a8).toLowerCase().codePointAt(0), 0x118c8);
|
||||
assertEq(String.fromCodePoint(0x118a9).toLowerCase().codePointAt(0), 0x118c9);
|
||||
assertEq(String.fromCodePoint(0x118aa).toLowerCase().codePointAt(0), 0x118ca);
|
||||
assertEq(String.fromCodePoint(0x118ab).toLowerCase().codePointAt(0), 0x118cb);
|
||||
assertEq(String.fromCodePoint(0x118ac).toLowerCase().codePointAt(0), 0x118cc);
|
||||
assertEq(String.fromCodePoint(0x118ad).toLowerCase().codePointAt(0), 0x118cd);
|
||||
assertEq(String.fromCodePoint(0x118ae).toLowerCase().codePointAt(0), 0x118ce);
|
||||
assertEq(String.fromCodePoint(0x118af).toLowerCase().codePointAt(0), 0x118cf);
|
||||
assertEq(String.fromCodePoint(0x118b0).toLowerCase().codePointAt(0), 0x118d0);
|
||||
assertEq(String.fromCodePoint(0x118b1).toLowerCase().codePointAt(0), 0x118d1);
|
||||
assertEq(String.fromCodePoint(0x118b2).toLowerCase().codePointAt(0), 0x118d2);
|
||||
assertEq(String.fromCodePoint(0x118b3).toLowerCase().codePointAt(0), 0x118d3);
|
||||
assertEq(String.fromCodePoint(0x118b4).toLowerCase().codePointAt(0), 0x118d4);
|
||||
assertEq(String.fromCodePoint(0x118b5).toLowerCase().codePointAt(0), 0x118d5);
|
||||
assertEq(String.fromCodePoint(0x118b6).toLowerCase().codePointAt(0), 0x118d6);
|
||||
assertEq(String.fromCodePoint(0x118b7).toLowerCase().codePointAt(0), 0x118d7);
|
||||
assertEq(String.fromCodePoint(0x118b8).toLowerCase().codePointAt(0), 0x118d8);
|
||||
assertEq(String.fromCodePoint(0x118b9).toLowerCase().codePointAt(0), 0x118d9);
|
||||
assertEq(String.fromCodePoint(0x118ba).toLowerCase().codePointAt(0), 0x118da);
|
||||
assertEq(String.fromCodePoint(0x118bb).toLowerCase().codePointAt(0), 0x118db);
|
||||
assertEq(String.fromCodePoint(0x118bc).toLowerCase().codePointAt(0), 0x118dc);
|
||||
assertEq(String.fromCodePoint(0x118bd).toLowerCase().codePointAt(0), 0x118dd);
|
||||
assertEq(String.fromCodePoint(0x118be).toLowerCase().codePointAt(0), 0x118de);
|
||||
assertEq(String.fromCodePoint(0x118bf).toLowerCase().codePointAt(0), 0x118df);
|
||||
assertEq(String.fromCodePoint(0x16e40).toLowerCase().codePointAt(0), 0x16e60);
|
||||
assertEq(String.fromCodePoint(0x16e41).toLowerCase().codePointAt(0), 0x16e61);
|
||||
assertEq(String.fromCodePoint(0x16e42).toLowerCase().codePointAt(0), 0x16e62);
|
||||
assertEq(String.fromCodePoint(0x16e43).toLowerCase().codePointAt(0), 0x16e63);
|
||||
assertEq(String.fromCodePoint(0x16e44).toLowerCase().codePointAt(0), 0x16e64);
|
||||
assertEq(String.fromCodePoint(0x16e45).toLowerCase().codePointAt(0), 0x16e65);
|
||||
assertEq(String.fromCodePoint(0x16e46).toLowerCase().codePointAt(0), 0x16e66);
|
||||
assertEq(String.fromCodePoint(0x16e47).toLowerCase().codePointAt(0), 0x16e67);
|
||||
assertEq(String.fromCodePoint(0x16e48).toLowerCase().codePointAt(0), 0x16e68);
|
||||
assertEq(String.fromCodePoint(0x16e49).toLowerCase().codePointAt(0), 0x16e69);
|
||||
assertEq(String.fromCodePoint(0x16e4a).toLowerCase().codePointAt(0), 0x16e6a);
|
||||
assertEq(String.fromCodePoint(0x16e4b).toLowerCase().codePointAt(0), 0x16e6b);
|
||||
assertEq(String.fromCodePoint(0x16e4c).toLowerCase().codePointAt(0), 0x16e6c);
|
||||
assertEq(String.fromCodePoint(0x16e4d).toLowerCase().codePointAt(0), 0x16e6d);
|
||||
assertEq(String.fromCodePoint(0x16e4e).toLowerCase().codePointAt(0), 0x16e6e);
|
||||
assertEq(String.fromCodePoint(0x16e4f).toLowerCase().codePointAt(0), 0x16e6f);
|
||||
assertEq(String.fromCodePoint(0x16e50).toLowerCase().codePointAt(0), 0x16e70);
|
||||
assertEq(String.fromCodePoint(0x16e51).toLowerCase().codePointAt(0), 0x16e71);
|
||||
assertEq(String.fromCodePoint(0x16e52).toLowerCase().codePointAt(0), 0x16e72);
|
||||
assertEq(String.fromCodePoint(0x16e53).toLowerCase().codePointAt(0), 0x16e73);
|
||||
assertEq(String.fromCodePoint(0x16e54).toLowerCase().codePointAt(0), 0x16e74);
|
||||
assertEq(String.fromCodePoint(0x16e55).toLowerCase().codePointAt(0), 0x16e75);
|
||||
assertEq(String.fromCodePoint(0x16e56).toLowerCase().codePointAt(0), 0x16e76);
|
||||
assertEq(String.fromCodePoint(0x16e57).toLowerCase().codePointAt(0), 0x16e77);
|
||||
assertEq(String.fromCodePoint(0x16e58).toLowerCase().codePointAt(0), 0x16e78);
|
||||
assertEq(String.fromCodePoint(0x16e59).toLowerCase().codePointAt(0), 0x16e79);
|
||||
assertEq(String.fromCodePoint(0x16e5a).toLowerCase().codePointAt(0), 0x16e7a);
|
||||
assertEq(String.fromCodePoint(0x16e5b).toLowerCase().codePointAt(0), 0x16e7b);
|
||||
assertEq(String.fromCodePoint(0x16e5c).toLowerCase().codePointAt(0), 0x16e7c);
|
||||
assertEq(String.fromCodePoint(0x16e5d).toLowerCase().codePointAt(0), 0x16e7d);
|
||||
assertEq(String.fromCodePoint(0x16e5e).toLowerCase().codePointAt(0), 0x16e7e);
|
||||
assertEq(String.fromCodePoint(0x16e5f).toLowerCase().codePointAt(0), 0x16e7f);
|
||||
assertEq(String.fromCodePoint(0x1e900).toLowerCase().codePointAt(0), 0x1e922);
|
||||
assertEq(String.fromCodePoint(0x1e901).toLowerCase().codePointAt(0), 0x1e923);
|
||||
assertEq(String.fromCodePoint(0x1e902).toLowerCase().codePointAt(0), 0x1e924);
|
||||
assertEq(String.fromCodePoint(0x1e903).toLowerCase().codePointAt(0), 0x1e925);
|
||||
assertEq(String.fromCodePoint(0x1e904).toLowerCase().codePointAt(0), 0x1e926);
|
||||
assertEq(String.fromCodePoint(0x1e905).toLowerCase().codePointAt(0), 0x1e927);
|
||||
assertEq(String.fromCodePoint(0x1e906).toLowerCase().codePointAt(0), 0x1e928);
|
||||
assertEq(String.fromCodePoint(0x1e907).toLowerCase().codePointAt(0), 0x1e929);
|
||||
assertEq(String.fromCodePoint(0x1e908).toLowerCase().codePointAt(0), 0x1e92a);
|
||||
assertEq(String.fromCodePoint(0x1e909).toLowerCase().codePointAt(0), 0x1e92b);
|
||||
assertEq(String.fromCodePoint(0x1e90a).toLowerCase().codePointAt(0), 0x1e92c);
|
||||
assertEq(String.fromCodePoint(0x1e90b).toLowerCase().codePointAt(0), 0x1e92d);
|
||||
assertEq(String.fromCodePoint(0x1e90c).toLowerCase().codePointAt(0), 0x1e92e);
|
||||
assertEq(String.fromCodePoint(0x1e90d).toLowerCase().codePointAt(0), 0x1e92f);
|
||||
assertEq(String.fromCodePoint(0x1e90e).toLowerCase().codePointAt(0), 0x1e930);
|
||||
assertEq(String.fromCodePoint(0x1e90f).toLowerCase().codePointAt(0), 0x1e931);
|
||||
assertEq(String.fromCodePoint(0x1e910).toLowerCase().codePointAt(0), 0x1e932);
|
||||
assertEq(String.fromCodePoint(0x1e911).toLowerCase().codePointAt(0), 0x1e933);
|
||||
assertEq(String.fromCodePoint(0x1e912).toLowerCase().codePointAt(0), 0x1e934);
|
||||
assertEq(String.fromCodePoint(0x1e913).toLowerCase().codePointAt(0), 0x1e935);
|
||||
assertEq(String.fromCodePoint(0x1e914).toLowerCase().codePointAt(0), 0x1e936);
|
||||
assertEq(String.fromCodePoint(0x1e915).toLowerCase().codePointAt(0), 0x1e937);
|
||||
assertEq(String.fromCodePoint(0x1e916).toLowerCase().codePointAt(0), 0x1e938);
|
||||
assertEq(String.fromCodePoint(0x1e917).toLowerCase().codePointAt(0), 0x1e939);
|
||||
assertEq(String.fromCodePoint(0x1e918).toLowerCase().codePointAt(0), 0x1e93a);
|
||||
assertEq(String.fromCodePoint(0x1e919).toLowerCase().codePointAt(0), 0x1e93b);
|
||||
assertEq(String.fromCodePoint(0x1e91a).toLowerCase().codePointAt(0), 0x1e93c);
|
||||
assertEq(String.fromCodePoint(0x1e91b).toLowerCase().codePointAt(0), 0x1e93d);
|
||||
assertEq(String.fromCodePoint(0x1e91c).toLowerCase().codePointAt(0), 0x1e93e);
|
||||
assertEq(String.fromCodePoint(0x1e91d).toLowerCase().codePointAt(0), 0x1e93f);
|
||||
assertEq(String.fromCodePoint(0x1e91e).toLowerCase().codePointAt(0), 0x1e940);
|
||||
assertEq(String.fromCodePoint(0x1e91f).toLowerCase().codePointAt(0), 0x1e941);
|
||||
assertEq(String.fromCodePoint(0x1e920).toLowerCase().codePointAt(0), 0x1e942);
|
||||
assertEq(String.fromCodePoint(0x1e921).toLowerCase().codePointAt(0), 0x1e943);
|
||||
assertEq(String.fromCodePoint(0x10428).toUpperCase().codePointAt(0), 0x10400); // DESERET SMALL LETTER LONG I, DESERET CAPITAL LETTER LONG I
|
||||
assertEq(String.fromCodePoint(0x10429).toUpperCase().codePointAt(0), 0x10401); // DESERET SMALL LETTER LONG E, DESERET CAPITAL LETTER LONG E
|
||||
assertEq(String.fromCodePoint(0x1042A).toUpperCase().codePointAt(0), 0x10402); // DESERET SMALL LETTER LONG A, DESERET CAPITAL LETTER LONG A
|
||||
assertEq(String.fromCodePoint(0x1042B).toUpperCase().codePointAt(0), 0x10403); // DESERET SMALL LETTER LONG AH, DESERET CAPITAL LETTER LONG AH
|
||||
assertEq(String.fromCodePoint(0x1042C).toUpperCase().codePointAt(0), 0x10404); // DESERET SMALL LETTER LONG O, DESERET CAPITAL LETTER LONG O
|
||||
assertEq(String.fromCodePoint(0x1042D).toUpperCase().codePointAt(0), 0x10405); // DESERET SMALL LETTER LONG OO, DESERET CAPITAL LETTER LONG OO
|
||||
assertEq(String.fromCodePoint(0x1042E).toUpperCase().codePointAt(0), 0x10406); // DESERET SMALL LETTER SHORT I, DESERET CAPITAL LETTER SHORT I
|
||||
assertEq(String.fromCodePoint(0x1042F).toUpperCase().codePointAt(0), 0x10407); // DESERET SMALL LETTER SHORT E, DESERET CAPITAL LETTER SHORT E
|
||||
assertEq(String.fromCodePoint(0x10430).toUpperCase().codePointAt(0), 0x10408); // DESERET SMALL LETTER SHORT A, DESERET CAPITAL LETTER SHORT A
|
||||
assertEq(String.fromCodePoint(0x10431).toUpperCase().codePointAt(0), 0x10409); // DESERET SMALL LETTER SHORT AH, DESERET CAPITAL LETTER SHORT AH
|
||||
assertEq(String.fromCodePoint(0x10432).toUpperCase().codePointAt(0), 0x1040A); // DESERET SMALL LETTER SHORT O, DESERET CAPITAL LETTER SHORT O
|
||||
assertEq(String.fromCodePoint(0x10433).toUpperCase().codePointAt(0), 0x1040B); // DESERET SMALL LETTER SHORT OO, DESERET CAPITAL LETTER SHORT OO
|
||||
assertEq(String.fromCodePoint(0x10434).toUpperCase().codePointAt(0), 0x1040C); // DESERET SMALL LETTER AY, DESERET CAPITAL LETTER AY
|
||||
assertEq(String.fromCodePoint(0x10435).toUpperCase().codePointAt(0), 0x1040D); // DESERET SMALL LETTER OW, DESERET CAPITAL LETTER OW
|
||||
assertEq(String.fromCodePoint(0x10436).toUpperCase().codePointAt(0), 0x1040E); // DESERET SMALL LETTER WU, DESERET CAPITAL LETTER WU
|
||||
assertEq(String.fromCodePoint(0x10437).toUpperCase().codePointAt(0), 0x1040F); // DESERET SMALL LETTER YEE, DESERET CAPITAL LETTER YEE
|
||||
assertEq(String.fromCodePoint(0x10438).toUpperCase().codePointAt(0), 0x10410); // DESERET SMALL LETTER H, DESERET CAPITAL LETTER H
|
||||
assertEq(String.fromCodePoint(0x10439).toUpperCase().codePointAt(0), 0x10411); // DESERET SMALL LETTER PEE, DESERET CAPITAL LETTER PEE
|
||||
assertEq(String.fromCodePoint(0x1043A).toUpperCase().codePointAt(0), 0x10412); // DESERET SMALL LETTER BEE, DESERET CAPITAL LETTER BEE
|
||||
assertEq(String.fromCodePoint(0x1043B).toUpperCase().codePointAt(0), 0x10413); // DESERET SMALL LETTER TEE, DESERET CAPITAL LETTER TEE
|
||||
assertEq(String.fromCodePoint(0x1043C).toUpperCase().codePointAt(0), 0x10414); // DESERET SMALL LETTER DEE, DESERET CAPITAL LETTER DEE
|
||||
assertEq(String.fromCodePoint(0x1043D).toUpperCase().codePointAt(0), 0x10415); // DESERET SMALL LETTER CHEE, DESERET CAPITAL LETTER CHEE
|
||||
assertEq(String.fromCodePoint(0x1043E).toUpperCase().codePointAt(0), 0x10416); // DESERET SMALL LETTER JEE, DESERET CAPITAL LETTER JEE
|
||||
assertEq(String.fromCodePoint(0x1043F).toUpperCase().codePointAt(0), 0x10417); // DESERET SMALL LETTER KAY, DESERET CAPITAL LETTER KAY
|
||||
assertEq(String.fromCodePoint(0x10440).toUpperCase().codePointAt(0), 0x10418); // DESERET SMALL LETTER GAY, DESERET CAPITAL LETTER GAY
|
||||
assertEq(String.fromCodePoint(0x10441).toUpperCase().codePointAt(0), 0x10419); // DESERET SMALL LETTER EF, DESERET CAPITAL LETTER EF
|
||||
assertEq(String.fromCodePoint(0x10442).toUpperCase().codePointAt(0), 0x1041A); // DESERET SMALL LETTER VEE, DESERET CAPITAL LETTER VEE
|
||||
assertEq(String.fromCodePoint(0x10443).toUpperCase().codePointAt(0), 0x1041B); // DESERET SMALL LETTER ETH, DESERET CAPITAL LETTER ETH
|
||||
assertEq(String.fromCodePoint(0x10444).toUpperCase().codePointAt(0), 0x1041C); // DESERET SMALL LETTER THEE, DESERET CAPITAL LETTER THEE
|
||||
assertEq(String.fromCodePoint(0x10445).toUpperCase().codePointAt(0), 0x1041D); // DESERET SMALL LETTER ES, DESERET CAPITAL LETTER ES
|
||||
assertEq(String.fromCodePoint(0x10446).toUpperCase().codePointAt(0), 0x1041E); // DESERET SMALL LETTER ZEE, DESERET CAPITAL LETTER ZEE
|
||||
assertEq(String.fromCodePoint(0x10447).toUpperCase().codePointAt(0), 0x1041F); // DESERET SMALL LETTER ESH, DESERET CAPITAL LETTER ESH
|
||||
assertEq(String.fromCodePoint(0x10448).toUpperCase().codePointAt(0), 0x10420); // DESERET SMALL LETTER ZHEE, DESERET CAPITAL LETTER ZHEE
|
||||
assertEq(String.fromCodePoint(0x10449).toUpperCase().codePointAt(0), 0x10421); // DESERET SMALL LETTER ER, DESERET CAPITAL LETTER ER
|
||||
assertEq(String.fromCodePoint(0x1044A).toUpperCase().codePointAt(0), 0x10422); // DESERET SMALL LETTER EL, DESERET CAPITAL LETTER EL
|
||||
assertEq(String.fromCodePoint(0x1044B).toUpperCase().codePointAt(0), 0x10423); // DESERET SMALL LETTER EM, DESERET CAPITAL LETTER EM
|
||||
assertEq(String.fromCodePoint(0x1044C).toUpperCase().codePointAt(0), 0x10424); // DESERET SMALL LETTER EN, DESERET CAPITAL LETTER EN
|
||||
assertEq(String.fromCodePoint(0x1044D).toUpperCase().codePointAt(0), 0x10425); // DESERET SMALL LETTER ENG, DESERET CAPITAL LETTER ENG
|
||||
assertEq(String.fromCodePoint(0x1044E).toUpperCase().codePointAt(0), 0x10426); // DESERET SMALL LETTER OI, DESERET CAPITAL LETTER OI
|
||||
assertEq(String.fromCodePoint(0x1044F).toUpperCase().codePointAt(0), 0x10427); // DESERET SMALL LETTER EW, DESERET CAPITAL LETTER EW
|
||||
assertEq(String.fromCodePoint(0x104D8).toUpperCase().codePointAt(0), 0x104B0); // OSAGE SMALL LETTER A, OSAGE CAPITAL LETTER A
|
||||
assertEq(String.fromCodePoint(0x104D9).toUpperCase().codePointAt(0), 0x104B1); // OSAGE SMALL LETTER AI, OSAGE CAPITAL LETTER AI
|
||||
assertEq(String.fromCodePoint(0x104DA).toUpperCase().codePointAt(0), 0x104B2); // OSAGE SMALL LETTER AIN, OSAGE CAPITAL LETTER AIN
|
||||
assertEq(String.fromCodePoint(0x104DB).toUpperCase().codePointAt(0), 0x104B3); // OSAGE SMALL LETTER AH, OSAGE CAPITAL LETTER AH
|
||||
assertEq(String.fromCodePoint(0x104DC).toUpperCase().codePointAt(0), 0x104B4); // OSAGE SMALL LETTER BRA, OSAGE CAPITAL LETTER BRA
|
||||
assertEq(String.fromCodePoint(0x104DD).toUpperCase().codePointAt(0), 0x104B5); // OSAGE SMALL LETTER CHA, OSAGE CAPITAL LETTER CHA
|
||||
assertEq(String.fromCodePoint(0x104DE).toUpperCase().codePointAt(0), 0x104B6); // OSAGE SMALL LETTER EHCHA, OSAGE CAPITAL LETTER EHCHA
|
||||
assertEq(String.fromCodePoint(0x104DF).toUpperCase().codePointAt(0), 0x104B7); // OSAGE SMALL LETTER E, OSAGE CAPITAL LETTER E
|
||||
assertEq(String.fromCodePoint(0x104E0).toUpperCase().codePointAt(0), 0x104B8); // OSAGE SMALL LETTER EIN, OSAGE CAPITAL LETTER EIN
|
||||
assertEq(String.fromCodePoint(0x104E1).toUpperCase().codePointAt(0), 0x104B9); // OSAGE SMALL LETTER HA, OSAGE CAPITAL LETTER HA
|
||||
assertEq(String.fromCodePoint(0x104E2).toUpperCase().codePointAt(0), 0x104BA); // OSAGE SMALL LETTER HYA, OSAGE CAPITAL LETTER HYA
|
||||
assertEq(String.fromCodePoint(0x104E3).toUpperCase().codePointAt(0), 0x104BB); // OSAGE SMALL LETTER I, OSAGE CAPITAL LETTER I
|
||||
assertEq(String.fromCodePoint(0x104E4).toUpperCase().codePointAt(0), 0x104BC); // OSAGE SMALL LETTER KA, OSAGE CAPITAL LETTER KA
|
||||
assertEq(String.fromCodePoint(0x104E5).toUpperCase().codePointAt(0), 0x104BD); // OSAGE SMALL LETTER EHKA, OSAGE CAPITAL LETTER EHKA
|
||||
assertEq(String.fromCodePoint(0x104E6).toUpperCase().codePointAt(0), 0x104BE); // OSAGE SMALL LETTER KYA, OSAGE CAPITAL LETTER KYA
|
||||
assertEq(String.fromCodePoint(0x104E7).toUpperCase().codePointAt(0), 0x104BF); // OSAGE SMALL LETTER LA, OSAGE CAPITAL LETTER LA
|
||||
assertEq(String.fromCodePoint(0x104E8).toUpperCase().codePointAt(0), 0x104C0); // OSAGE SMALL LETTER MA, OSAGE CAPITAL LETTER MA
|
||||
assertEq(String.fromCodePoint(0x104E9).toUpperCase().codePointAt(0), 0x104C1); // OSAGE SMALL LETTER NA, OSAGE CAPITAL LETTER NA
|
||||
assertEq(String.fromCodePoint(0x104EA).toUpperCase().codePointAt(0), 0x104C2); // OSAGE SMALL LETTER O, OSAGE CAPITAL LETTER O
|
||||
assertEq(String.fromCodePoint(0x104EB).toUpperCase().codePointAt(0), 0x104C3); // OSAGE SMALL LETTER OIN, OSAGE CAPITAL LETTER OIN
|
||||
assertEq(String.fromCodePoint(0x104EC).toUpperCase().codePointAt(0), 0x104C4); // OSAGE SMALL LETTER PA, OSAGE CAPITAL LETTER PA
|
||||
assertEq(String.fromCodePoint(0x104ED).toUpperCase().codePointAt(0), 0x104C5); // OSAGE SMALL LETTER EHPA, OSAGE CAPITAL LETTER EHPA
|
||||
assertEq(String.fromCodePoint(0x104EE).toUpperCase().codePointAt(0), 0x104C6); // OSAGE SMALL LETTER SA, OSAGE CAPITAL LETTER SA
|
||||
assertEq(String.fromCodePoint(0x104EF).toUpperCase().codePointAt(0), 0x104C7); // OSAGE SMALL LETTER SHA, OSAGE CAPITAL LETTER SHA
|
||||
assertEq(String.fromCodePoint(0x104F0).toUpperCase().codePointAt(0), 0x104C8); // OSAGE SMALL LETTER TA, OSAGE CAPITAL LETTER TA
|
||||
assertEq(String.fromCodePoint(0x104F1).toUpperCase().codePointAt(0), 0x104C9); // OSAGE SMALL LETTER EHTA, OSAGE CAPITAL LETTER EHTA
|
||||
assertEq(String.fromCodePoint(0x104F2).toUpperCase().codePointAt(0), 0x104CA); // OSAGE SMALL LETTER TSA, OSAGE CAPITAL LETTER TSA
|
||||
assertEq(String.fromCodePoint(0x104F3).toUpperCase().codePointAt(0), 0x104CB); // OSAGE SMALL LETTER EHTSA, OSAGE CAPITAL LETTER EHTSA
|
||||
assertEq(String.fromCodePoint(0x104F4).toUpperCase().codePointAt(0), 0x104CC); // OSAGE SMALL LETTER TSHA, OSAGE CAPITAL LETTER TSHA
|
||||
assertEq(String.fromCodePoint(0x104F5).toUpperCase().codePointAt(0), 0x104CD); // OSAGE SMALL LETTER DHA, OSAGE CAPITAL LETTER DHA
|
||||
assertEq(String.fromCodePoint(0x104F6).toUpperCase().codePointAt(0), 0x104CE); // OSAGE SMALL LETTER U, OSAGE CAPITAL LETTER U
|
||||
assertEq(String.fromCodePoint(0x104F7).toUpperCase().codePointAt(0), 0x104CF); // OSAGE SMALL LETTER WA, OSAGE CAPITAL LETTER WA
|
||||
assertEq(String.fromCodePoint(0x104F8).toUpperCase().codePointAt(0), 0x104D0); // OSAGE SMALL LETTER KHA, OSAGE CAPITAL LETTER KHA
|
||||
assertEq(String.fromCodePoint(0x104F9).toUpperCase().codePointAt(0), 0x104D1); // OSAGE SMALL LETTER GHA, OSAGE CAPITAL LETTER GHA
|
||||
assertEq(String.fromCodePoint(0x104FA).toUpperCase().codePointAt(0), 0x104D2); // OSAGE SMALL LETTER ZA, OSAGE CAPITAL LETTER ZA
|
||||
assertEq(String.fromCodePoint(0x104FB).toUpperCase().codePointAt(0), 0x104D3); // OSAGE SMALL LETTER ZHA, OSAGE CAPITAL LETTER ZHA
|
||||
assertEq(String.fromCodePoint(0x10CC0).toUpperCase().codePointAt(0), 0x10C80); // OLD HUNGARIAN SMALL LETTER A, OLD HUNGARIAN CAPITAL LETTER A
|
||||
assertEq(String.fromCodePoint(0x10CC1).toUpperCase().codePointAt(0), 0x10C81); // OLD HUNGARIAN SMALL LETTER AA, OLD HUNGARIAN CAPITAL LETTER AA
|
||||
assertEq(String.fromCodePoint(0x10CC2).toUpperCase().codePointAt(0), 0x10C82); // OLD HUNGARIAN SMALL LETTER EB, OLD HUNGARIAN CAPITAL LETTER EB
|
||||
assertEq(String.fromCodePoint(0x10CC3).toUpperCase().codePointAt(0), 0x10C83); // OLD HUNGARIAN SMALL LETTER AMB, OLD HUNGARIAN CAPITAL LETTER AMB
|
||||
assertEq(String.fromCodePoint(0x10CC4).toUpperCase().codePointAt(0), 0x10C84); // OLD HUNGARIAN SMALL LETTER EC, OLD HUNGARIAN CAPITAL LETTER EC
|
||||
assertEq(String.fromCodePoint(0x10CC5).toUpperCase().codePointAt(0), 0x10C85); // OLD HUNGARIAN SMALL LETTER ENC, OLD HUNGARIAN CAPITAL LETTER ENC
|
||||
assertEq(String.fromCodePoint(0x10CC6).toUpperCase().codePointAt(0), 0x10C86); // OLD HUNGARIAN SMALL LETTER ECS, OLD HUNGARIAN CAPITAL LETTER ECS
|
||||
assertEq(String.fromCodePoint(0x10CC7).toUpperCase().codePointAt(0), 0x10C87); // OLD HUNGARIAN SMALL LETTER ED, OLD HUNGARIAN CAPITAL LETTER ED
|
||||
assertEq(String.fromCodePoint(0x10CC8).toUpperCase().codePointAt(0), 0x10C88); // OLD HUNGARIAN SMALL LETTER AND, OLD HUNGARIAN CAPITAL LETTER AND
|
||||
assertEq(String.fromCodePoint(0x10CC9).toUpperCase().codePointAt(0), 0x10C89); // OLD HUNGARIAN SMALL LETTER E, OLD HUNGARIAN CAPITAL LETTER E
|
||||
assertEq(String.fromCodePoint(0x10CCA).toUpperCase().codePointAt(0), 0x10C8A); // OLD HUNGARIAN SMALL LETTER CLOSE E, OLD HUNGARIAN CAPITAL LETTER CLOSE E
|
||||
assertEq(String.fromCodePoint(0x10CCB).toUpperCase().codePointAt(0), 0x10C8B); // OLD HUNGARIAN SMALL LETTER EE, OLD HUNGARIAN CAPITAL LETTER EE
|
||||
assertEq(String.fromCodePoint(0x10CCC).toUpperCase().codePointAt(0), 0x10C8C); // OLD HUNGARIAN SMALL LETTER EF, OLD HUNGARIAN CAPITAL LETTER EF
|
||||
assertEq(String.fromCodePoint(0x10CCD).toUpperCase().codePointAt(0), 0x10C8D); // OLD HUNGARIAN SMALL LETTER EG, OLD HUNGARIAN CAPITAL LETTER EG
|
||||
assertEq(String.fromCodePoint(0x10CCE).toUpperCase().codePointAt(0), 0x10C8E); // OLD HUNGARIAN SMALL LETTER EGY, OLD HUNGARIAN CAPITAL LETTER EGY
|
||||
assertEq(String.fromCodePoint(0x10CCF).toUpperCase().codePointAt(0), 0x10C8F); // OLD HUNGARIAN SMALL LETTER EH, OLD HUNGARIAN CAPITAL LETTER EH
|
||||
assertEq(String.fromCodePoint(0x10CD0).toUpperCase().codePointAt(0), 0x10C90); // OLD HUNGARIAN SMALL LETTER I, OLD HUNGARIAN CAPITAL LETTER I
|
||||
assertEq(String.fromCodePoint(0x10CD1).toUpperCase().codePointAt(0), 0x10C91); // OLD HUNGARIAN SMALL LETTER II, OLD HUNGARIAN CAPITAL LETTER II
|
||||
assertEq(String.fromCodePoint(0x10CD2).toUpperCase().codePointAt(0), 0x10C92); // OLD HUNGARIAN SMALL LETTER EJ, OLD HUNGARIAN CAPITAL LETTER EJ
|
||||
assertEq(String.fromCodePoint(0x10CD3).toUpperCase().codePointAt(0), 0x10C93); // OLD HUNGARIAN SMALL LETTER EK, OLD HUNGARIAN CAPITAL LETTER EK
|
||||
assertEq(String.fromCodePoint(0x10CD4).toUpperCase().codePointAt(0), 0x10C94); // OLD HUNGARIAN SMALL LETTER AK, OLD HUNGARIAN CAPITAL LETTER AK
|
||||
assertEq(String.fromCodePoint(0x10CD5).toUpperCase().codePointAt(0), 0x10C95); // OLD HUNGARIAN SMALL LETTER UNK, OLD HUNGARIAN CAPITAL LETTER UNK
|
||||
assertEq(String.fromCodePoint(0x10CD6).toUpperCase().codePointAt(0), 0x10C96); // OLD HUNGARIAN SMALL LETTER EL, OLD HUNGARIAN CAPITAL LETTER EL
|
||||
assertEq(String.fromCodePoint(0x10CD7).toUpperCase().codePointAt(0), 0x10C97); // OLD HUNGARIAN SMALL LETTER ELY, OLD HUNGARIAN CAPITAL LETTER ELY
|
||||
assertEq(String.fromCodePoint(0x10CD8).toUpperCase().codePointAt(0), 0x10C98); // OLD HUNGARIAN SMALL LETTER EM, OLD HUNGARIAN CAPITAL LETTER EM
|
||||
assertEq(String.fromCodePoint(0x10CD9).toUpperCase().codePointAt(0), 0x10C99); // OLD HUNGARIAN SMALL LETTER EN, OLD HUNGARIAN CAPITAL LETTER EN
|
||||
assertEq(String.fromCodePoint(0x10CDA).toUpperCase().codePointAt(0), 0x10C9A); // OLD HUNGARIAN SMALL LETTER ENY, OLD HUNGARIAN CAPITAL LETTER ENY
|
||||
assertEq(String.fromCodePoint(0x10CDB).toUpperCase().codePointAt(0), 0x10C9B); // OLD HUNGARIAN SMALL LETTER O, OLD HUNGARIAN CAPITAL LETTER O
|
||||
assertEq(String.fromCodePoint(0x10CDC).toUpperCase().codePointAt(0), 0x10C9C); // OLD HUNGARIAN SMALL LETTER OO, OLD HUNGARIAN CAPITAL LETTER OO
|
||||
assertEq(String.fromCodePoint(0x10CDD).toUpperCase().codePointAt(0), 0x10C9D); // OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE, OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE
|
||||
assertEq(String.fromCodePoint(0x10CDE).toUpperCase().codePointAt(0), 0x10C9E); // OLD HUNGARIAN SMALL LETTER RUDIMENTA OE, OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE
|
||||
assertEq(String.fromCodePoint(0x10CDF).toUpperCase().codePointAt(0), 0x10C9F); // OLD HUNGARIAN SMALL LETTER OEE, OLD HUNGARIAN CAPITAL LETTER OEE
|
||||
assertEq(String.fromCodePoint(0x10CE0).toUpperCase().codePointAt(0), 0x10CA0); // OLD HUNGARIAN SMALL LETTER EP, OLD HUNGARIAN CAPITAL LETTER EP
|
||||
assertEq(String.fromCodePoint(0x10CE1).toUpperCase().codePointAt(0), 0x10CA1); // OLD HUNGARIAN SMALL LETTER EMP, OLD HUNGARIAN CAPITAL LETTER EMP
|
||||
assertEq(String.fromCodePoint(0x10CE2).toUpperCase().codePointAt(0), 0x10CA2); // OLD HUNGARIAN SMALL LETTER ER, OLD HUNGARIAN CAPITAL LETTER ER
|
||||
assertEq(String.fromCodePoint(0x10CE3).toUpperCase().codePointAt(0), 0x10CA3); // OLD HUNGARIAN SMALL LETTER SHORT ER, OLD HUNGARIAN CAPITAL LETTER SHORT ER
|
||||
assertEq(String.fromCodePoint(0x10CE4).toUpperCase().codePointAt(0), 0x10CA4); // OLD HUNGARIAN SMALL LETTER ES, OLD HUNGARIAN CAPITAL LETTER ES
|
||||
assertEq(String.fromCodePoint(0x10CE5).toUpperCase().codePointAt(0), 0x10CA5); // OLD HUNGARIAN SMALL LETTER ESZ, OLD HUNGARIAN CAPITAL LETTER ESZ
|
||||
assertEq(String.fromCodePoint(0x10CE6).toUpperCase().codePointAt(0), 0x10CA6); // OLD HUNGARIAN SMALL LETTER ET, OLD HUNGARIAN CAPITAL LETTER ET
|
||||
assertEq(String.fromCodePoint(0x10CE7).toUpperCase().codePointAt(0), 0x10CA7); // OLD HUNGARIAN SMALL LETTER ENT, OLD HUNGARIAN CAPITAL LETTER ENT
|
||||
assertEq(String.fromCodePoint(0x10CE8).toUpperCase().codePointAt(0), 0x10CA8); // OLD HUNGARIAN SMALL LETTER ETY, OLD HUNGARIAN CAPITAL LETTER ETY
|
||||
assertEq(String.fromCodePoint(0x10CE9).toUpperCase().codePointAt(0), 0x10CA9); // OLD HUNGARIAN SMALL LETTER ECH, OLD HUNGARIAN CAPITAL LETTER ECH
|
||||
assertEq(String.fromCodePoint(0x10CEA).toUpperCase().codePointAt(0), 0x10CAA); // OLD HUNGARIAN SMALL LETTER U, OLD HUNGARIAN CAPITAL LETTER U
|
||||
assertEq(String.fromCodePoint(0x10CEB).toUpperCase().codePointAt(0), 0x10CAB); // OLD HUNGARIAN SMALL LETTER UU, OLD HUNGARIAN CAPITAL LETTER UU
|
||||
assertEq(String.fromCodePoint(0x10CEC).toUpperCase().codePointAt(0), 0x10CAC); // OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE, OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE
|
||||
assertEq(String.fromCodePoint(0x10CED).toUpperCase().codePointAt(0), 0x10CAD); // OLD HUNGARIAN SMALL LETTER RUDIMENTA UE, OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE
|
||||
assertEq(String.fromCodePoint(0x10CEE).toUpperCase().codePointAt(0), 0x10CAE); // OLD HUNGARIAN SMALL LETTER EV, OLD HUNGARIAN CAPITAL LETTER EV
|
||||
assertEq(String.fromCodePoint(0x10CEF).toUpperCase().codePointAt(0), 0x10CAF); // OLD HUNGARIAN SMALL LETTER EZ, OLD HUNGARIAN CAPITAL LETTER EZ
|
||||
assertEq(String.fromCodePoint(0x10CF0).toUpperCase().codePointAt(0), 0x10CB0); // OLD HUNGARIAN SMALL LETTER EZS, OLD HUNGARIAN CAPITAL LETTER EZS
|
||||
assertEq(String.fromCodePoint(0x10CF1).toUpperCase().codePointAt(0), 0x10CB1); // OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN, OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN
|
||||
assertEq(String.fromCodePoint(0x10CF2).toUpperCase().codePointAt(0), 0x10CB2); // OLD HUNGARIAN SMALL LETTER US, OLD HUNGARIAN CAPITAL LETTER US
|
||||
assertEq(String.fromCodePoint(0x118C0).toUpperCase().codePointAt(0), 0x118A0); // WARANG CITI SMALL LETTER NGAA, WARANG CITI CAPITAL LETTER NGAA
|
||||
assertEq(String.fromCodePoint(0x118C1).toUpperCase().codePointAt(0), 0x118A1); // WARANG CITI SMALL LETTER A, WARANG CITI CAPITAL LETTER A
|
||||
assertEq(String.fromCodePoint(0x118C2).toUpperCase().codePointAt(0), 0x118A2); // WARANG CITI SMALL LETTER WI, WARANG CITI CAPITAL LETTER WI
|
||||
assertEq(String.fromCodePoint(0x118C3).toUpperCase().codePointAt(0), 0x118A3); // WARANG CITI SMALL LETTER YU, WARANG CITI CAPITAL LETTER YU
|
||||
assertEq(String.fromCodePoint(0x118C4).toUpperCase().codePointAt(0), 0x118A4); // WARANG CITI SMALL LETTER YA, WARANG CITI CAPITAL LETTER YA
|
||||
assertEq(String.fromCodePoint(0x118C5).toUpperCase().codePointAt(0), 0x118A5); // WARANG CITI SMALL LETTER YO, WARANG CITI CAPITAL LETTER YO
|
||||
assertEq(String.fromCodePoint(0x118C6).toUpperCase().codePointAt(0), 0x118A6); // WARANG CITI SMALL LETTER II, WARANG CITI CAPITAL LETTER II
|
||||
assertEq(String.fromCodePoint(0x118C7).toUpperCase().codePointAt(0), 0x118A7); // WARANG CITI SMALL LETTER UU, WARANG CITI CAPITAL LETTER UU
|
||||
assertEq(String.fromCodePoint(0x118C8).toUpperCase().codePointAt(0), 0x118A8); // WARANG CITI SMALL LETTER E, WARANG CITI CAPITAL LETTER E
|
||||
assertEq(String.fromCodePoint(0x118C9).toUpperCase().codePointAt(0), 0x118A9); // WARANG CITI SMALL LETTER O, WARANG CITI CAPITAL LETTER O
|
||||
assertEq(String.fromCodePoint(0x118CA).toUpperCase().codePointAt(0), 0x118AA); // WARANG CITI SMALL LETTER ANG, WARANG CITI CAPITAL LETTER ANG
|
||||
assertEq(String.fromCodePoint(0x118CB).toUpperCase().codePointAt(0), 0x118AB); // WARANG CITI SMALL LETTER GA, WARANG CITI CAPITAL LETTER GA
|
||||
assertEq(String.fromCodePoint(0x118CC).toUpperCase().codePointAt(0), 0x118AC); // WARANG CITI SMALL LETTER KO, WARANG CITI CAPITAL LETTER KO
|
||||
assertEq(String.fromCodePoint(0x118CD).toUpperCase().codePointAt(0), 0x118AD); // WARANG CITI SMALL LETTER ENY, WARANG CITI CAPITAL LETTER ENY
|
||||
assertEq(String.fromCodePoint(0x118CE).toUpperCase().codePointAt(0), 0x118AE); // WARANG CITI SMALL LETTER YUJ, WARANG CITI CAPITAL LETTER YUJ
|
||||
assertEq(String.fromCodePoint(0x118CF).toUpperCase().codePointAt(0), 0x118AF); // WARANG CITI SMALL LETTER UC, WARANG CITI CAPITAL LETTER UC
|
||||
assertEq(String.fromCodePoint(0x118D0).toUpperCase().codePointAt(0), 0x118B0); // WARANG CITI SMALL LETTER ENN, WARANG CITI CAPITAL LETTER ENN
|
||||
assertEq(String.fromCodePoint(0x118D1).toUpperCase().codePointAt(0), 0x118B1); // WARANG CITI SMALL LETTER ODD, WARANG CITI CAPITAL LETTER ODD
|
||||
assertEq(String.fromCodePoint(0x118D2).toUpperCase().codePointAt(0), 0x118B2); // WARANG CITI SMALL LETTER TTE, WARANG CITI CAPITAL LETTER TTE
|
||||
assertEq(String.fromCodePoint(0x118D3).toUpperCase().codePointAt(0), 0x118B3); // WARANG CITI SMALL LETTER NUNG, WARANG CITI CAPITAL LETTER NUNG
|
||||
assertEq(String.fromCodePoint(0x118D4).toUpperCase().codePointAt(0), 0x118B4); // WARANG CITI SMALL LETTER DA, WARANG CITI CAPITAL LETTER DA
|
||||
assertEq(String.fromCodePoint(0x118D5).toUpperCase().codePointAt(0), 0x118B5); // WARANG CITI SMALL LETTER AT, WARANG CITI CAPITAL LETTER AT
|
||||
assertEq(String.fromCodePoint(0x118D6).toUpperCase().codePointAt(0), 0x118B6); // WARANG CITI SMALL LETTER AM, WARANG CITI CAPITAL LETTER AM
|
||||
assertEq(String.fromCodePoint(0x118D7).toUpperCase().codePointAt(0), 0x118B7); // WARANG CITI SMALL LETTER BU, WARANG CITI CAPITAL LETTER BU
|
||||
assertEq(String.fromCodePoint(0x118D8).toUpperCase().codePointAt(0), 0x118B8); // WARANG CITI SMALL LETTER PU, WARANG CITI CAPITAL LETTER PU
|
||||
assertEq(String.fromCodePoint(0x118D9).toUpperCase().codePointAt(0), 0x118B9); // WARANG CITI SMALL LETTER HIYO, WARANG CITI CAPITAL LETTER HIYO
|
||||
assertEq(String.fromCodePoint(0x118DA).toUpperCase().codePointAt(0), 0x118BA); // WARANG CITI SMALL LETTER HOLO, WARANG CITI CAPITAL LETTER HOLO
|
||||
assertEq(String.fromCodePoint(0x118DB).toUpperCase().codePointAt(0), 0x118BB); // WARANG CITI SMALL LETTER HORR, WARANG CITI CAPITAL LETTER HORR
|
||||
assertEq(String.fromCodePoint(0x118DC).toUpperCase().codePointAt(0), 0x118BC); // WARANG CITI SMALL LETTER HAR, WARANG CITI CAPITAL LETTER HAR
|
||||
assertEq(String.fromCodePoint(0x118DD).toUpperCase().codePointAt(0), 0x118BD); // WARANG CITI SMALL LETTER SSUU, WARANG CITI CAPITAL LETTER SSUU
|
||||
assertEq(String.fromCodePoint(0x118DE).toUpperCase().codePointAt(0), 0x118BE); // WARANG CITI SMALL LETTER SII, WARANG CITI CAPITAL LETTER SII
|
||||
assertEq(String.fromCodePoint(0x118DF).toUpperCase().codePointAt(0), 0x118BF); // WARANG CITI SMALL LETTER VIYO, WARANG CITI CAPITAL LETTER VIYO
|
||||
assertEq(String.fromCodePoint(0x16E60).toUpperCase().codePointAt(0), 0x16E40); // MEDEFAIDRIN SMALL LETTER M, MEDEFAIDRIN CAPITAL LETTER M
|
||||
assertEq(String.fromCodePoint(0x16E61).toUpperCase().codePointAt(0), 0x16E41); // MEDEFAIDRIN SMALL LETTER S, MEDEFAIDRIN CAPITAL LETTER S
|
||||
assertEq(String.fromCodePoint(0x16E62).toUpperCase().codePointAt(0), 0x16E42); // MEDEFAIDRIN SMALL LETTER V, MEDEFAIDRIN CAPITAL LETTER V
|
||||
assertEq(String.fromCodePoint(0x16E63).toUpperCase().codePointAt(0), 0x16E43); // MEDEFAIDRIN SMALL LETTER W, MEDEFAIDRIN CAPITAL LETTER W
|
||||
assertEq(String.fromCodePoint(0x16E64).toUpperCase().codePointAt(0), 0x16E44); // MEDEFAIDRIN SMALL LETTER ATIU, MEDEFAIDRIN CAPITAL LETTER ATIU
|
||||
assertEq(String.fromCodePoint(0x16E65).toUpperCase().codePointAt(0), 0x16E45); // MEDEFAIDRIN SMALL LETTER Z, MEDEFAIDRIN CAPITAL LETTER Z
|
||||
assertEq(String.fromCodePoint(0x16E66).toUpperCase().codePointAt(0), 0x16E46); // MEDEFAIDRIN SMALL LETTER KP, MEDEFAIDRIN CAPITAL LETTER KP
|
||||
assertEq(String.fromCodePoint(0x16E67).toUpperCase().codePointAt(0), 0x16E47); // MEDEFAIDRIN SMALL LETTER P, MEDEFAIDRIN CAPITAL LETTER P
|
||||
assertEq(String.fromCodePoint(0x16E68).toUpperCase().codePointAt(0), 0x16E48); // MEDEFAIDRIN SMALL LETTER T, MEDEFAIDRIN CAPITAL LETTER T
|
||||
assertEq(String.fromCodePoint(0x16E69).toUpperCase().codePointAt(0), 0x16E49); // MEDEFAIDRIN SMALL LETTER G, MEDEFAIDRIN CAPITAL LETTER G
|
||||
assertEq(String.fromCodePoint(0x16E6A).toUpperCase().codePointAt(0), 0x16E4A); // MEDEFAIDRIN SMALL LETTER F, MEDEFAIDRIN CAPITAL LETTER F
|
||||
assertEq(String.fromCodePoint(0x16E6B).toUpperCase().codePointAt(0), 0x16E4B); // MEDEFAIDRIN SMALL LETTER I, MEDEFAIDRIN CAPITAL LETTER I
|
||||
assertEq(String.fromCodePoint(0x16E6C).toUpperCase().codePointAt(0), 0x16E4C); // MEDEFAIDRIN SMALL LETTER K, MEDEFAIDRIN CAPITAL LETTER K
|
||||
assertEq(String.fromCodePoint(0x16E6D).toUpperCase().codePointAt(0), 0x16E4D); // MEDEFAIDRIN SMALL LETTER A, MEDEFAIDRIN CAPITAL LETTER A
|
||||
assertEq(String.fromCodePoint(0x16E6E).toUpperCase().codePointAt(0), 0x16E4E); // MEDEFAIDRIN SMALL LETTER J, MEDEFAIDRIN CAPITAL LETTER J
|
||||
assertEq(String.fromCodePoint(0x16E6F).toUpperCase().codePointAt(0), 0x16E4F); // MEDEFAIDRIN SMALL LETTER E, MEDEFAIDRIN CAPITAL LETTER E
|
||||
assertEq(String.fromCodePoint(0x16E70).toUpperCase().codePointAt(0), 0x16E50); // MEDEFAIDRIN SMALL LETTER B, MEDEFAIDRIN CAPITAL LETTER B
|
||||
assertEq(String.fromCodePoint(0x16E71).toUpperCase().codePointAt(0), 0x16E51); // MEDEFAIDRIN SMALL LETTER C, MEDEFAIDRIN CAPITAL LETTER C
|
||||
assertEq(String.fromCodePoint(0x16E72).toUpperCase().codePointAt(0), 0x16E52); // MEDEFAIDRIN SMALL LETTER U, MEDEFAIDRIN CAPITAL LETTER U
|
||||
assertEq(String.fromCodePoint(0x16E73).toUpperCase().codePointAt(0), 0x16E53); // MEDEFAIDRIN SMALL LETTER YU, MEDEFAIDRIN CAPITAL LETTER YU
|
||||
assertEq(String.fromCodePoint(0x16E74).toUpperCase().codePointAt(0), 0x16E54); // MEDEFAIDRIN SMALL LETTER L, MEDEFAIDRIN CAPITAL LETTER L
|
||||
assertEq(String.fromCodePoint(0x16E75).toUpperCase().codePointAt(0), 0x16E55); // MEDEFAIDRIN SMALL LETTER Q, MEDEFAIDRIN CAPITAL LETTER Q
|
||||
assertEq(String.fromCodePoint(0x16E76).toUpperCase().codePointAt(0), 0x16E56); // MEDEFAIDRIN SMALL LETTER HP, MEDEFAIDRIN CAPITAL LETTER HP
|
||||
assertEq(String.fromCodePoint(0x16E77).toUpperCase().codePointAt(0), 0x16E57); // MEDEFAIDRIN SMALL LETTER NY, MEDEFAIDRIN CAPITAL LETTER NY
|
||||
assertEq(String.fromCodePoint(0x16E78).toUpperCase().codePointAt(0), 0x16E58); // MEDEFAIDRIN SMALL LETTER X, MEDEFAIDRIN CAPITAL LETTER X
|
||||
assertEq(String.fromCodePoint(0x16E79).toUpperCase().codePointAt(0), 0x16E59); // MEDEFAIDRIN SMALL LETTER D, MEDEFAIDRIN CAPITAL LETTER D
|
||||
assertEq(String.fromCodePoint(0x16E7A).toUpperCase().codePointAt(0), 0x16E5A); // MEDEFAIDRIN SMALL LETTER OE, MEDEFAIDRIN CAPITAL LETTER OE
|
||||
assertEq(String.fromCodePoint(0x16E7B).toUpperCase().codePointAt(0), 0x16E5B); // MEDEFAIDRIN SMALL LETTER N, MEDEFAIDRIN CAPITAL LETTER N
|
||||
assertEq(String.fromCodePoint(0x16E7C).toUpperCase().codePointAt(0), 0x16E5C); // MEDEFAIDRIN SMALL LETTER R, MEDEFAIDRIN CAPITAL LETTER R
|
||||
assertEq(String.fromCodePoint(0x16E7D).toUpperCase().codePointAt(0), 0x16E5D); // MEDEFAIDRIN SMALL LETTER O, MEDEFAIDRIN CAPITAL LETTER O
|
||||
assertEq(String.fromCodePoint(0x16E7E).toUpperCase().codePointAt(0), 0x16E5E); // MEDEFAIDRIN SMALL LETTER AI, MEDEFAIDRIN CAPITAL LETTER AI
|
||||
assertEq(String.fromCodePoint(0x16E7F).toUpperCase().codePointAt(0), 0x16E5F); // MEDEFAIDRIN SMALL LETTER Y, MEDEFAIDRIN CAPITAL LETTER Y
|
||||
assertEq(String.fromCodePoint(0x1E922).toUpperCase().codePointAt(0), 0x1E900); // ADLAM SMALL LETTER ALIF, ADLAM CAPITAL LETTER ALIF
|
||||
assertEq(String.fromCodePoint(0x1E923).toUpperCase().codePointAt(0), 0x1E901); // ADLAM SMALL LETTER DAALI, ADLAM CAPITAL LETTER DAALI
|
||||
assertEq(String.fromCodePoint(0x1E924).toUpperCase().codePointAt(0), 0x1E902); // ADLAM SMALL LETTER LAAM, ADLAM CAPITAL LETTER LAAM
|
||||
assertEq(String.fromCodePoint(0x1E925).toUpperCase().codePointAt(0), 0x1E903); // ADLAM SMALL LETTER MIIM, ADLAM CAPITAL LETTER MIIM
|
||||
assertEq(String.fromCodePoint(0x1E926).toUpperCase().codePointAt(0), 0x1E904); // ADLAM SMALL LETTER BA, ADLAM CAPITAL LETTER BA
|
||||
assertEq(String.fromCodePoint(0x1E927).toUpperCase().codePointAt(0), 0x1E905); // ADLAM SMALL LETTER SINNYIIYHE, ADLAM CAPITAL LETTER SINNYIIYHE
|
||||
assertEq(String.fromCodePoint(0x1E928).toUpperCase().codePointAt(0), 0x1E906); // ADLAM SMALL LETTER PE, ADLAM CAPITAL LETTER PE
|
||||
assertEq(String.fromCodePoint(0x1E929).toUpperCase().codePointAt(0), 0x1E907); // ADLAM SMALL LETTER BHE, ADLAM CAPITAL LETTER BHE
|
||||
assertEq(String.fromCodePoint(0x1E92A).toUpperCase().codePointAt(0), 0x1E908); // ADLAM SMALL LETTER RA, ADLAM CAPITAL LETTER RA
|
||||
assertEq(String.fromCodePoint(0x1E92B).toUpperCase().codePointAt(0), 0x1E909); // ADLAM SMALL LETTER E, ADLAM CAPITAL LETTER E
|
||||
assertEq(String.fromCodePoint(0x1E92C).toUpperCase().codePointAt(0), 0x1E90A); // ADLAM SMALL LETTER FA, ADLAM CAPITAL LETTER FA
|
||||
assertEq(String.fromCodePoint(0x1E92D).toUpperCase().codePointAt(0), 0x1E90B); // ADLAM SMALL LETTER I, ADLAM CAPITAL LETTER I
|
||||
assertEq(String.fromCodePoint(0x1E92E).toUpperCase().codePointAt(0), 0x1E90C); // ADLAM SMALL LETTER O, ADLAM CAPITAL LETTER O
|
||||
assertEq(String.fromCodePoint(0x1E92F).toUpperCase().codePointAt(0), 0x1E90D); // ADLAM SMALL LETTER DHA, ADLAM CAPITAL LETTER DHA
|
||||
assertEq(String.fromCodePoint(0x1E930).toUpperCase().codePointAt(0), 0x1E90E); // ADLAM SMALL LETTER YHE, ADLAM CAPITAL LETTER YHE
|
||||
assertEq(String.fromCodePoint(0x1E931).toUpperCase().codePointAt(0), 0x1E90F); // ADLAM SMALL LETTER WAW, ADLAM CAPITAL LETTER WAW
|
||||
assertEq(String.fromCodePoint(0x1E932).toUpperCase().codePointAt(0), 0x1E910); // ADLAM SMALL LETTER NUN, ADLAM CAPITAL LETTER NUN
|
||||
assertEq(String.fromCodePoint(0x1E933).toUpperCase().codePointAt(0), 0x1E911); // ADLAM SMALL LETTER KAF, ADLAM CAPITAL LETTER KAF
|
||||
assertEq(String.fromCodePoint(0x1E934).toUpperCase().codePointAt(0), 0x1E912); // ADLAM SMALL LETTER YA, ADLAM CAPITAL LETTER YA
|
||||
assertEq(String.fromCodePoint(0x1E935).toUpperCase().codePointAt(0), 0x1E913); // ADLAM SMALL LETTER U, ADLAM CAPITAL LETTER U
|
||||
assertEq(String.fromCodePoint(0x1E936).toUpperCase().codePointAt(0), 0x1E914); // ADLAM SMALL LETTER JIIM, ADLAM CAPITAL LETTER JIIM
|
||||
assertEq(String.fromCodePoint(0x1E937).toUpperCase().codePointAt(0), 0x1E915); // ADLAM SMALL LETTER CHI, ADLAM CAPITAL LETTER CHI
|
||||
assertEq(String.fromCodePoint(0x1E938).toUpperCase().codePointAt(0), 0x1E916); // ADLAM SMALL LETTER HA, ADLAM CAPITAL LETTER HA
|
||||
assertEq(String.fromCodePoint(0x1E939).toUpperCase().codePointAt(0), 0x1E917); // ADLAM SMALL LETTER QAAF, ADLAM CAPITAL LETTER QAAF
|
||||
assertEq(String.fromCodePoint(0x1E93A).toUpperCase().codePointAt(0), 0x1E918); // ADLAM SMALL LETTER GA, ADLAM CAPITAL LETTER GA
|
||||
assertEq(String.fromCodePoint(0x1E93B).toUpperCase().codePointAt(0), 0x1E919); // ADLAM SMALL LETTER NYA, ADLAM CAPITAL LETTER NYA
|
||||
assertEq(String.fromCodePoint(0x1E93C).toUpperCase().codePointAt(0), 0x1E91A); // ADLAM SMALL LETTER TU, ADLAM CAPITAL LETTER TU
|
||||
assertEq(String.fromCodePoint(0x1E93D).toUpperCase().codePointAt(0), 0x1E91B); // ADLAM SMALL LETTER NHA, ADLAM CAPITAL LETTER NHA
|
||||
assertEq(String.fromCodePoint(0x1E93E).toUpperCase().codePointAt(0), 0x1E91C); // ADLAM SMALL LETTER VA, ADLAM CAPITAL LETTER VA
|
||||
assertEq(String.fromCodePoint(0x1E93F).toUpperCase().codePointAt(0), 0x1E91D); // ADLAM SMALL LETTER KHA, ADLAM CAPITAL LETTER KHA
|
||||
assertEq(String.fromCodePoint(0x1E940).toUpperCase().codePointAt(0), 0x1E91E); // ADLAM SMALL LETTER GBE, ADLAM CAPITAL LETTER GBE
|
||||
assertEq(String.fromCodePoint(0x1E941).toUpperCase().codePointAt(0), 0x1E91F); // ADLAM SMALL LETTER ZAL, ADLAM CAPITAL LETTER ZAL
|
||||
assertEq(String.fromCodePoint(0x1E942).toUpperCase().codePointAt(0), 0x1E920); // ADLAM SMALL LETTER KPO, ADLAM CAPITAL LETTER KPO
|
||||
assertEq(String.fromCodePoint(0x1E943).toUpperCase().codePointAt(0), 0x1E921); // ADLAM SMALL LETTER SHA, ADLAM CAPITAL LETTER SHA
|
||||
assertEq(String.fromCodePoint(0x10400).toLowerCase().codePointAt(0), 0x10428); // DESERET CAPITAL LETTER LONG I, DESERET SMALL LETTER LONG I
|
||||
assertEq(String.fromCodePoint(0x10401).toLowerCase().codePointAt(0), 0x10429); // DESERET CAPITAL LETTER LONG E, DESERET SMALL LETTER LONG E
|
||||
assertEq(String.fromCodePoint(0x10402).toLowerCase().codePointAt(0), 0x1042A); // DESERET CAPITAL LETTER LONG A, DESERET SMALL LETTER LONG A
|
||||
assertEq(String.fromCodePoint(0x10403).toLowerCase().codePointAt(0), 0x1042B); // DESERET CAPITAL LETTER LONG AH, DESERET SMALL LETTER LONG AH
|
||||
assertEq(String.fromCodePoint(0x10404).toLowerCase().codePointAt(0), 0x1042C); // DESERET CAPITAL LETTER LONG O, DESERET SMALL LETTER LONG O
|
||||
assertEq(String.fromCodePoint(0x10405).toLowerCase().codePointAt(0), 0x1042D); // DESERET CAPITAL LETTER LONG OO, DESERET SMALL LETTER LONG OO
|
||||
assertEq(String.fromCodePoint(0x10406).toLowerCase().codePointAt(0), 0x1042E); // DESERET CAPITAL LETTER SHORT I, DESERET SMALL LETTER SHORT I
|
||||
assertEq(String.fromCodePoint(0x10407).toLowerCase().codePointAt(0), 0x1042F); // DESERET CAPITAL LETTER SHORT E, DESERET SMALL LETTER SHORT E
|
||||
assertEq(String.fromCodePoint(0x10408).toLowerCase().codePointAt(0), 0x10430); // DESERET CAPITAL LETTER SHORT A, DESERET SMALL LETTER SHORT A
|
||||
assertEq(String.fromCodePoint(0x10409).toLowerCase().codePointAt(0), 0x10431); // DESERET CAPITAL LETTER SHORT AH, DESERET SMALL LETTER SHORT AH
|
||||
assertEq(String.fromCodePoint(0x1040A).toLowerCase().codePointAt(0), 0x10432); // DESERET CAPITAL LETTER SHORT O, DESERET SMALL LETTER SHORT O
|
||||
assertEq(String.fromCodePoint(0x1040B).toLowerCase().codePointAt(0), 0x10433); // DESERET CAPITAL LETTER SHORT OO, DESERET SMALL LETTER SHORT OO
|
||||
assertEq(String.fromCodePoint(0x1040C).toLowerCase().codePointAt(0), 0x10434); // DESERET CAPITAL LETTER AY, DESERET SMALL LETTER AY
|
||||
assertEq(String.fromCodePoint(0x1040D).toLowerCase().codePointAt(0), 0x10435); // DESERET CAPITAL LETTER OW, DESERET SMALL LETTER OW
|
||||
assertEq(String.fromCodePoint(0x1040E).toLowerCase().codePointAt(0), 0x10436); // DESERET CAPITAL LETTER WU, DESERET SMALL LETTER WU
|
||||
assertEq(String.fromCodePoint(0x1040F).toLowerCase().codePointAt(0), 0x10437); // DESERET CAPITAL LETTER YEE, DESERET SMALL LETTER YEE
|
||||
assertEq(String.fromCodePoint(0x10410).toLowerCase().codePointAt(0), 0x10438); // DESERET CAPITAL LETTER H, DESERET SMALL LETTER H
|
||||
assertEq(String.fromCodePoint(0x10411).toLowerCase().codePointAt(0), 0x10439); // DESERET CAPITAL LETTER PEE, DESERET SMALL LETTER PEE
|
||||
assertEq(String.fromCodePoint(0x10412).toLowerCase().codePointAt(0), 0x1043A); // DESERET CAPITAL LETTER BEE, DESERET SMALL LETTER BEE
|
||||
assertEq(String.fromCodePoint(0x10413).toLowerCase().codePointAt(0), 0x1043B); // DESERET CAPITAL LETTER TEE, DESERET SMALL LETTER TEE
|
||||
assertEq(String.fromCodePoint(0x10414).toLowerCase().codePointAt(0), 0x1043C); // DESERET CAPITAL LETTER DEE, DESERET SMALL LETTER DEE
|
||||
assertEq(String.fromCodePoint(0x10415).toLowerCase().codePointAt(0), 0x1043D); // DESERET CAPITAL LETTER CHEE, DESERET SMALL LETTER CHEE
|
||||
assertEq(String.fromCodePoint(0x10416).toLowerCase().codePointAt(0), 0x1043E); // DESERET CAPITAL LETTER JEE, DESERET SMALL LETTER JEE
|
||||
assertEq(String.fromCodePoint(0x10417).toLowerCase().codePointAt(0), 0x1043F); // DESERET CAPITAL LETTER KAY, DESERET SMALL LETTER KAY
|
||||
assertEq(String.fromCodePoint(0x10418).toLowerCase().codePointAt(0), 0x10440); // DESERET CAPITAL LETTER GAY, DESERET SMALL LETTER GAY
|
||||
assertEq(String.fromCodePoint(0x10419).toLowerCase().codePointAt(0), 0x10441); // DESERET CAPITAL LETTER EF, DESERET SMALL LETTER EF
|
||||
assertEq(String.fromCodePoint(0x1041A).toLowerCase().codePointAt(0), 0x10442); // DESERET CAPITAL LETTER VEE, DESERET SMALL LETTER VEE
|
||||
assertEq(String.fromCodePoint(0x1041B).toLowerCase().codePointAt(0), 0x10443); // DESERET CAPITAL LETTER ETH, DESERET SMALL LETTER ETH
|
||||
assertEq(String.fromCodePoint(0x1041C).toLowerCase().codePointAt(0), 0x10444); // DESERET CAPITAL LETTER THEE, DESERET SMALL LETTER THEE
|
||||
assertEq(String.fromCodePoint(0x1041D).toLowerCase().codePointAt(0), 0x10445); // DESERET CAPITAL LETTER ES, DESERET SMALL LETTER ES
|
||||
assertEq(String.fromCodePoint(0x1041E).toLowerCase().codePointAt(0), 0x10446); // DESERET CAPITAL LETTER ZEE, DESERET SMALL LETTER ZEE
|
||||
assertEq(String.fromCodePoint(0x1041F).toLowerCase().codePointAt(0), 0x10447); // DESERET CAPITAL LETTER ESH, DESERET SMALL LETTER ESH
|
||||
assertEq(String.fromCodePoint(0x10420).toLowerCase().codePointAt(0), 0x10448); // DESERET CAPITAL LETTER ZHEE, DESERET SMALL LETTER ZHEE
|
||||
assertEq(String.fromCodePoint(0x10421).toLowerCase().codePointAt(0), 0x10449); // DESERET CAPITAL LETTER ER, DESERET SMALL LETTER ER
|
||||
assertEq(String.fromCodePoint(0x10422).toLowerCase().codePointAt(0), 0x1044A); // DESERET CAPITAL LETTER EL, DESERET SMALL LETTER EL
|
||||
assertEq(String.fromCodePoint(0x10423).toLowerCase().codePointAt(0), 0x1044B); // DESERET CAPITAL LETTER EM, DESERET SMALL LETTER EM
|
||||
assertEq(String.fromCodePoint(0x10424).toLowerCase().codePointAt(0), 0x1044C); // DESERET CAPITAL LETTER EN, DESERET SMALL LETTER EN
|
||||
assertEq(String.fromCodePoint(0x10425).toLowerCase().codePointAt(0), 0x1044D); // DESERET CAPITAL LETTER ENG, DESERET SMALL LETTER ENG
|
||||
assertEq(String.fromCodePoint(0x10426).toLowerCase().codePointAt(0), 0x1044E); // DESERET CAPITAL LETTER OI, DESERET SMALL LETTER OI
|
||||
assertEq(String.fromCodePoint(0x10427).toLowerCase().codePointAt(0), 0x1044F); // DESERET CAPITAL LETTER EW, DESERET SMALL LETTER EW
|
||||
assertEq(String.fromCodePoint(0x104B0).toLowerCase().codePointAt(0), 0x104D8); // OSAGE CAPITAL LETTER A, OSAGE SMALL LETTER A
|
||||
assertEq(String.fromCodePoint(0x104B1).toLowerCase().codePointAt(0), 0x104D9); // OSAGE CAPITAL LETTER AI, OSAGE SMALL LETTER AI
|
||||
assertEq(String.fromCodePoint(0x104B2).toLowerCase().codePointAt(0), 0x104DA); // OSAGE CAPITAL LETTER AIN, OSAGE SMALL LETTER AIN
|
||||
assertEq(String.fromCodePoint(0x104B3).toLowerCase().codePointAt(0), 0x104DB); // OSAGE CAPITAL LETTER AH, OSAGE SMALL LETTER AH
|
||||
assertEq(String.fromCodePoint(0x104B4).toLowerCase().codePointAt(0), 0x104DC); // OSAGE CAPITAL LETTER BRA, OSAGE SMALL LETTER BRA
|
||||
assertEq(String.fromCodePoint(0x104B5).toLowerCase().codePointAt(0), 0x104DD); // OSAGE CAPITAL LETTER CHA, OSAGE SMALL LETTER CHA
|
||||
assertEq(String.fromCodePoint(0x104B6).toLowerCase().codePointAt(0), 0x104DE); // OSAGE CAPITAL LETTER EHCHA, OSAGE SMALL LETTER EHCHA
|
||||
assertEq(String.fromCodePoint(0x104B7).toLowerCase().codePointAt(0), 0x104DF); // OSAGE CAPITAL LETTER E, OSAGE SMALL LETTER E
|
||||
assertEq(String.fromCodePoint(0x104B8).toLowerCase().codePointAt(0), 0x104E0); // OSAGE CAPITAL LETTER EIN, OSAGE SMALL LETTER EIN
|
||||
assertEq(String.fromCodePoint(0x104B9).toLowerCase().codePointAt(0), 0x104E1); // OSAGE CAPITAL LETTER HA, OSAGE SMALL LETTER HA
|
||||
assertEq(String.fromCodePoint(0x104BA).toLowerCase().codePointAt(0), 0x104E2); // OSAGE CAPITAL LETTER HYA, OSAGE SMALL LETTER HYA
|
||||
assertEq(String.fromCodePoint(0x104BB).toLowerCase().codePointAt(0), 0x104E3); // OSAGE CAPITAL LETTER I, OSAGE SMALL LETTER I
|
||||
assertEq(String.fromCodePoint(0x104BC).toLowerCase().codePointAt(0), 0x104E4); // OSAGE CAPITAL LETTER KA, OSAGE SMALL LETTER KA
|
||||
assertEq(String.fromCodePoint(0x104BD).toLowerCase().codePointAt(0), 0x104E5); // OSAGE CAPITAL LETTER EHKA, OSAGE SMALL LETTER EHKA
|
||||
assertEq(String.fromCodePoint(0x104BE).toLowerCase().codePointAt(0), 0x104E6); // OSAGE CAPITAL LETTER KYA, OSAGE SMALL LETTER KYA
|
||||
assertEq(String.fromCodePoint(0x104BF).toLowerCase().codePointAt(0), 0x104E7); // OSAGE CAPITAL LETTER LA, OSAGE SMALL LETTER LA
|
||||
assertEq(String.fromCodePoint(0x104C0).toLowerCase().codePointAt(0), 0x104E8); // OSAGE CAPITAL LETTER MA, OSAGE SMALL LETTER MA
|
||||
assertEq(String.fromCodePoint(0x104C1).toLowerCase().codePointAt(0), 0x104E9); // OSAGE CAPITAL LETTER NA, OSAGE SMALL LETTER NA
|
||||
assertEq(String.fromCodePoint(0x104C2).toLowerCase().codePointAt(0), 0x104EA); // OSAGE CAPITAL LETTER O, OSAGE SMALL LETTER O
|
||||
assertEq(String.fromCodePoint(0x104C3).toLowerCase().codePointAt(0), 0x104EB); // OSAGE CAPITAL LETTER OIN, OSAGE SMALL LETTER OIN
|
||||
assertEq(String.fromCodePoint(0x104C4).toLowerCase().codePointAt(0), 0x104EC); // OSAGE CAPITAL LETTER PA, OSAGE SMALL LETTER PA
|
||||
assertEq(String.fromCodePoint(0x104C5).toLowerCase().codePointAt(0), 0x104ED); // OSAGE CAPITAL LETTER EHPA, OSAGE SMALL LETTER EHPA
|
||||
assertEq(String.fromCodePoint(0x104C6).toLowerCase().codePointAt(0), 0x104EE); // OSAGE CAPITAL LETTER SA, OSAGE SMALL LETTER SA
|
||||
assertEq(String.fromCodePoint(0x104C7).toLowerCase().codePointAt(0), 0x104EF); // OSAGE CAPITAL LETTER SHA, OSAGE SMALL LETTER SHA
|
||||
assertEq(String.fromCodePoint(0x104C8).toLowerCase().codePointAt(0), 0x104F0); // OSAGE CAPITAL LETTER TA, OSAGE SMALL LETTER TA
|
||||
assertEq(String.fromCodePoint(0x104C9).toLowerCase().codePointAt(0), 0x104F1); // OSAGE CAPITAL LETTER EHTA, OSAGE SMALL LETTER EHTA
|
||||
assertEq(String.fromCodePoint(0x104CA).toLowerCase().codePointAt(0), 0x104F2); // OSAGE CAPITAL LETTER TSA, OSAGE SMALL LETTER TSA
|
||||
assertEq(String.fromCodePoint(0x104CB).toLowerCase().codePointAt(0), 0x104F3); // OSAGE CAPITAL LETTER EHTSA, OSAGE SMALL LETTER EHTSA
|
||||
assertEq(String.fromCodePoint(0x104CC).toLowerCase().codePointAt(0), 0x104F4); // OSAGE CAPITAL LETTER TSHA, OSAGE SMALL LETTER TSHA
|
||||
assertEq(String.fromCodePoint(0x104CD).toLowerCase().codePointAt(0), 0x104F5); // OSAGE CAPITAL LETTER DHA, OSAGE SMALL LETTER DHA
|
||||
assertEq(String.fromCodePoint(0x104CE).toLowerCase().codePointAt(0), 0x104F6); // OSAGE CAPITAL LETTER U, OSAGE SMALL LETTER U
|
||||
assertEq(String.fromCodePoint(0x104CF).toLowerCase().codePointAt(0), 0x104F7); // OSAGE CAPITAL LETTER WA, OSAGE SMALL LETTER WA
|
||||
assertEq(String.fromCodePoint(0x104D0).toLowerCase().codePointAt(0), 0x104F8); // OSAGE CAPITAL LETTER KHA, OSAGE SMALL LETTER KHA
|
||||
assertEq(String.fromCodePoint(0x104D1).toLowerCase().codePointAt(0), 0x104F9); // OSAGE CAPITAL LETTER GHA, OSAGE SMALL LETTER GHA
|
||||
assertEq(String.fromCodePoint(0x104D2).toLowerCase().codePointAt(0), 0x104FA); // OSAGE CAPITAL LETTER ZA, OSAGE SMALL LETTER ZA
|
||||
assertEq(String.fromCodePoint(0x104D3).toLowerCase().codePointAt(0), 0x104FB); // OSAGE CAPITAL LETTER ZHA, OSAGE SMALL LETTER ZHA
|
||||
assertEq(String.fromCodePoint(0x10C80).toLowerCase().codePointAt(0), 0x10CC0); // OLD HUNGARIAN CAPITAL LETTER A, OLD HUNGARIAN SMALL LETTER A
|
||||
assertEq(String.fromCodePoint(0x10C81).toLowerCase().codePointAt(0), 0x10CC1); // OLD HUNGARIAN CAPITAL LETTER AA, OLD HUNGARIAN SMALL LETTER AA
|
||||
assertEq(String.fromCodePoint(0x10C82).toLowerCase().codePointAt(0), 0x10CC2); // OLD HUNGARIAN CAPITAL LETTER EB, OLD HUNGARIAN SMALL LETTER EB
|
||||
assertEq(String.fromCodePoint(0x10C83).toLowerCase().codePointAt(0), 0x10CC3); // OLD HUNGARIAN CAPITAL LETTER AMB, OLD HUNGARIAN SMALL LETTER AMB
|
||||
assertEq(String.fromCodePoint(0x10C84).toLowerCase().codePointAt(0), 0x10CC4); // OLD HUNGARIAN CAPITAL LETTER EC, OLD HUNGARIAN SMALL LETTER EC
|
||||
assertEq(String.fromCodePoint(0x10C85).toLowerCase().codePointAt(0), 0x10CC5); // OLD HUNGARIAN CAPITAL LETTER ENC, OLD HUNGARIAN SMALL LETTER ENC
|
||||
assertEq(String.fromCodePoint(0x10C86).toLowerCase().codePointAt(0), 0x10CC6); // OLD HUNGARIAN CAPITAL LETTER ECS, OLD HUNGARIAN SMALL LETTER ECS
|
||||
assertEq(String.fromCodePoint(0x10C87).toLowerCase().codePointAt(0), 0x10CC7); // OLD HUNGARIAN CAPITAL LETTER ED, OLD HUNGARIAN SMALL LETTER ED
|
||||
assertEq(String.fromCodePoint(0x10C88).toLowerCase().codePointAt(0), 0x10CC8); // OLD HUNGARIAN CAPITAL LETTER AND, OLD HUNGARIAN SMALL LETTER AND
|
||||
assertEq(String.fromCodePoint(0x10C89).toLowerCase().codePointAt(0), 0x10CC9); // OLD HUNGARIAN CAPITAL LETTER E, OLD HUNGARIAN SMALL LETTER E
|
||||
assertEq(String.fromCodePoint(0x10C8A).toLowerCase().codePointAt(0), 0x10CCA); // OLD HUNGARIAN CAPITAL LETTER CLOSE E, OLD HUNGARIAN SMALL LETTER CLOSE E
|
||||
assertEq(String.fromCodePoint(0x10C8B).toLowerCase().codePointAt(0), 0x10CCB); // OLD HUNGARIAN CAPITAL LETTER EE, OLD HUNGARIAN SMALL LETTER EE
|
||||
assertEq(String.fromCodePoint(0x10C8C).toLowerCase().codePointAt(0), 0x10CCC); // OLD HUNGARIAN CAPITAL LETTER EF, OLD HUNGARIAN SMALL LETTER EF
|
||||
assertEq(String.fromCodePoint(0x10C8D).toLowerCase().codePointAt(0), 0x10CCD); // OLD HUNGARIAN CAPITAL LETTER EG, OLD HUNGARIAN SMALL LETTER EG
|
||||
assertEq(String.fromCodePoint(0x10C8E).toLowerCase().codePointAt(0), 0x10CCE); // OLD HUNGARIAN CAPITAL LETTER EGY, OLD HUNGARIAN SMALL LETTER EGY
|
||||
assertEq(String.fromCodePoint(0x10C8F).toLowerCase().codePointAt(0), 0x10CCF); // OLD HUNGARIAN CAPITAL LETTER EH, OLD HUNGARIAN SMALL LETTER EH
|
||||
assertEq(String.fromCodePoint(0x10C90).toLowerCase().codePointAt(0), 0x10CD0); // OLD HUNGARIAN CAPITAL LETTER I, OLD HUNGARIAN SMALL LETTER I
|
||||
assertEq(String.fromCodePoint(0x10C91).toLowerCase().codePointAt(0), 0x10CD1); // OLD HUNGARIAN CAPITAL LETTER II, OLD HUNGARIAN SMALL LETTER II
|
||||
assertEq(String.fromCodePoint(0x10C92).toLowerCase().codePointAt(0), 0x10CD2); // OLD HUNGARIAN CAPITAL LETTER EJ, OLD HUNGARIAN SMALL LETTER EJ
|
||||
assertEq(String.fromCodePoint(0x10C93).toLowerCase().codePointAt(0), 0x10CD3); // OLD HUNGARIAN CAPITAL LETTER EK, OLD HUNGARIAN SMALL LETTER EK
|
||||
assertEq(String.fromCodePoint(0x10C94).toLowerCase().codePointAt(0), 0x10CD4); // OLD HUNGARIAN CAPITAL LETTER AK, OLD HUNGARIAN SMALL LETTER AK
|
||||
assertEq(String.fromCodePoint(0x10C95).toLowerCase().codePointAt(0), 0x10CD5); // OLD HUNGARIAN CAPITAL LETTER UNK, OLD HUNGARIAN SMALL LETTER UNK
|
||||
assertEq(String.fromCodePoint(0x10C96).toLowerCase().codePointAt(0), 0x10CD6); // OLD HUNGARIAN CAPITAL LETTER EL, OLD HUNGARIAN SMALL LETTER EL
|
||||
assertEq(String.fromCodePoint(0x10C97).toLowerCase().codePointAt(0), 0x10CD7); // OLD HUNGARIAN CAPITAL LETTER ELY, OLD HUNGARIAN SMALL LETTER ELY
|
||||
assertEq(String.fromCodePoint(0x10C98).toLowerCase().codePointAt(0), 0x10CD8); // OLD HUNGARIAN CAPITAL LETTER EM, OLD HUNGARIAN SMALL LETTER EM
|
||||
assertEq(String.fromCodePoint(0x10C99).toLowerCase().codePointAt(0), 0x10CD9); // OLD HUNGARIAN CAPITAL LETTER EN, OLD HUNGARIAN SMALL LETTER EN
|
||||
assertEq(String.fromCodePoint(0x10C9A).toLowerCase().codePointAt(0), 0x10CDA); // OLD HUNGARIAN CAPITAL LETTER ENY, OLD HUNGARIAN SMALL LETTER ENY
|
||||
assertEq(String.fromCodePoint(0x10C9B).toLowerCase().codePointAt(0), 0x10CDB); // OLD HUNGARIAN CAPITAL LETTER O, OLD HUNGARIAN SMALL LETTER O
|
||||
assertEq(String.fromCodePoint(0x10C9C).toLowerCase().codePointAt(0), 0x10CDC); // OLD HUNGARIAN CAPITAL LETTER OO, OLD HUNGARIAN SMALL LETTER OO
|
||||
assertEq(String.fromCodePoint(0x10C9D).toLowerCase().codePointAt(0), 0x10CDD); // OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE, OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE
|
||||
assertEq(String.fromCodePoint(0x10C9E).toLowerCase().codePointAt(0), 0x10CDE); // OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE, OLD HUNGARIAN SMALL LETTER RUDIMENTA OE
|
||||
assertEq(String.fromCodePoint(0x10C9F).toLowerCase().codePointAt(0), 0x10CDF); // OLD HUNGARIAN CAPITAL LETTER OEE, OLD HUNGARIAN SMALL LETTER OEE
|
||||
assertEq(String.fromCodePoint(0x10CA0).toLowerCase().codePointAt(0), 0x10CE0); // OLD HUNGARIAN CAPITAL LETTER EP, OLD HUNGARIAN SMALL LETTER EP
|
||||
assertEq(String.fromCodePoint(0x10CA1).toLowerCase().codePointAt(0), 0x10CE1); // OLD HUNGARIAN CAPITAL LETTER EMP, OLD HUNGARIAN SMALL LETTER EMP
|
||||
assertEq(String.fromCodePoint(0x10CA2).toLowerCase().codePointAt(0), 0x10CE2); // OLD HUNGARIAN CAPITAL LETTER ER, OLD HUNGARIAN SMALL LETTER ER
|
||||
assertEq(String.fromCodePoint(0x10CA3).toLowerCase().codePointAt(0), 0x10CE3); // OLD HUNGARIAN CAPITAL LETTER SHORT ER, OLD HUNGARIAN SMALL LETTER SHORT ER
|
||||
assertEq(String.fromCodePoint(0x10CA4).toLowerCase().codePointAt(0), 0x10CE4); // OLD HUNGARIAN CAPITAL LETTER ES, OLD HUNGARIAN SMALL LETTER ES
|
||||
assertEq(String.fromCodePoint(0x10CA5).toLowerCase().codePointAt(0), 0x10CE5); // OLD HUNGARIAN CAPITAL LETTER ESZ, OLD HUNGARIAN SMALL LETTER ESZ
|
||||
assertEq(String.fromCodePoint(0x10CA6).toLowerCase().codePointAt(0), 0x10CE6); // OLD HUNGARIAN CAPITAL LETTER ET, OLD HUNGARIAN SMALL LETTER ET
|
||||
assertEq(String.fromCodePoint(0x10CA7).toLowerCase().codePointAt(0), 0x10CE7); // OLD HUNGARIAN CAPITAL LETTER ENT, OLD HUNGARIAN SMALL LETTER ENT
|
||||
assertEq(String.fromCodePoint(0x10CA8).toLowerCase().codePointAt(0), 0x10CE8); // OLD HUNGARIAN CAPITAL LETTER ETY, OLD HUNGARIAN SMALL LETTER ETY
|
||||
assertEq(String.fromCodePoint(0x10CA9).toLowerCase().codePointAt(0), 0x10CE9); // OLD HUNGARIAN CAPITAL LETTER ECH, OLD HUNGARIAN SMALL LETTER ECH
|
||||
assertEq(String.fromCodePoint(0x10CAA).toLowerCase().codePointAt(0), 0x10CEA); // OLD HUNGARIAN CAPITAL LETTER U, OLD HUNGARIAN SMALL LETTER U
|
||||
assertEq(String.fromCodePoint(0x10CAB).toLowerCase().codePointAt(0), 0x10CEB); // OLD HUNGARIAN CAPITAL LETTER UU, OLD HUNGARIAN SMALL LETTER UU
|
||||
assertEq(String.fromCodePoint(0x10CAC).toLowerCase().codePointAt(0), 0x10CEC); // OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE, OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE
|
||||
assertEq(String.fromCodePoint(0x10CAD).toLowerCase().codePointAt(0), 0x10CED); // OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE, OLD HUNGARIAN SMALL LETTER RUDIMENTA UE
|
||||
assertEq(String.fromCodePoint(0x10CAE).toLowerCase().codePointAt(0), 0x10CEE); // OLD HUNGARIAN CAPITAL LETTER EV, OLD HUNGARIAN SMALL LETTER EV
|
||||
assertEq(String.fromCodePoint(0x10CAF).toLowerCase().codePointAt(0), 0x10CEF); // OLD HUNGARIAN CAPITAL LETTER EZ, OLD HUNGARIAN SMALL LETTER EZ
|
||||
assertEq(String.fromCodePoint(0x10CB0).toLowerCase().codePointAt(0), 0x10CF0); // OLD HUNGARIAN CAPITAL LETTER EZS, OLD HUNGARIAN SMALL LETTER EZS
|
||||
assertEq(String.fromCodePoint(0x10CB1).toLowerCase().codePointAt(0), 0x10CF1); // OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN, OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN
|
||||
assertEq(String.fromCodePoint(0x10CB2).toLowerCase().codePointAt(0), 0x10CF2); // OLD HUNGARIAN CAPITAL LETTER US, OLD HUNGARIAN SMALL LETTER US
|
||||
assertEq(String.fromCodePoint(0x118A0).toLowerCase().codePointAt(0), 0x118C0); // WARANG CITI CAPITAL LETTER NGAA, WARANG CITI SMALL LETTER NGAA
|
||||
assertEq(String.fromCodePoint(0x118A1).toLowerCase().codePointAt(0), 0x118C1); // WARANG CITI CAPITAL LETTER A, WARANG CITI SMALL LETTER A
|
||||
assertEq(String.fromCodePoint(0x118A2).toLowerCase().codePointAt(0), 0x118C2); // WARANG CITI CAPITAL LETTER WI, WARANG CITI SMALL LETTER WI
|
||||
assertEq(String.fromCodePoint(0x118A3).toLowerCase().codePointAt(0), 0x118C3); // WARANG CITI CAPITAL LETTER YU, WARANG CITI SMALL LETTER YU
|
||||
assertEq(String.fromCodePoint(0x118A4).toLowerCase().codePointAt(0), 0x118C4); // WARANG CITI CAPITAL LETTER YA, WARANG CITI SMALL LETTER YA
|
||||
assertEq(String.fromCodePoint(0x118A5).toLowerCase().codePointAt(0), 0x118C5); // WARANG CITI CAPITAL LETTER YO, WARANG CITI SMALL LETTER YO
|
||||
assertEq(String.fromCodePoint(0x118A6).toLowerCase().codePointAt(0), 0x118C6); // WARANG CITI CAPITAL LETTER II, WARANG CITI SMALL LETTER II
|
||||
assertEq(String.fromCodePoint(0x118A7).toLowerCase().codePointAt(0), 0x118C7); // WARANG CITI CAPITAL LETTER UU, WARANG CITI SMALL LETTER UU
|
||||
assertEq(String.fromCodePoint(0x118A8).toLowerCase().codePointAt(0), 0x118C8); // WARANG CITI CAPITAL LETTER E, WARANG CITI SMALL LETTER E
|
||||
assertEq(String.fromCodePoint(0x118A9).toLowerCase().codePointAt(0), 0x118C9); // WARANG CITI CAPITAL LETTER O, WARANG CITI SMALL LETTER O
|
||||
assertEq(String.fromCodePoint(0x118AA).toLowerCase().codePointAt(0), 0x118CA); // WARANG CITI CAPITAL LETTER ANG, WARANG CITI SMALL LETTER ANG
|
||||
assertEq(String.fromCodePoint(0x118AB).toLowerCase().codePointAt(0), 0x118CB); // WARANG CITI CAPITAL LETTER GA, WARANG CITI SMALL LETTER GA
|
||||
assertEq(String.fromCodePoint(0x118AC).toLowerCase().codePointAt(0), 0x118CC); // WARANG CITI CAPITAL LETTER KO, WARANG CITI SMALL LETTER KO
|
||||
assertEq(String.fromCodePoint(0x118AD).toLowerCase().codePointAt(0), 0x118CD); // WARANG CITI CAPITAL LETTER ENY, WARANG CITI SMALL LETTER ENY
|
||||
assertEq(String.fromCodePoint(0x118AE).toLowerCase().codePointAt(0), 0x118CE); // WARANG CITI CAPITAL LETTER YUJ, WARANG CITI SMALL LETTER YUJ
|
||||
assertEq(String.fromCodePoint(0x118AF).toLowerCase().codePointAt(0), 0x118CF); // WARANG CITI CAPITAL LETTER UC, WARANG CITI SMALL LETTER UC
|
||||
assertEq(String.fromCodePoint(0x118B0).toLowerCase().codePointAt(0), 0x118D0); // WARANG CITI CAPITAL LETTER ENN, WARANG CITI SMALL LETTER ENN
|
||||
assertEq(String.fromCodePoint(0x118B1).toLowerCase().codePointAt(0), 0x118D1); // WARANG CITI CAPITAL LETTER ODD, WARANG CITI SMALL LETTER ODD
|
||||
assertEq(String.fromCodePoint(0x118B2).toLowerCase().codePointAt(0), 0x118D2); // WARANG CITI CAPITAL LETTER TTE, WARANG CITI SMALL LETTER TTE
|
||||
assertEq(String.fromCodePoint(0x118B3).toLowerCase().codePointAt(0), 0x118D3); // WARANG CITI CAPITAL LETTER NUNG, WARANG CITI SMALL LETTER NUNG
|
||||
assertEq(String.fromCodePoint(0x118B4).toLowerCase().codePointAt(0), 0x118D4); // WARANG CITI CAPITAL LETTER DA, WARANG CITI SMALL LETTER DA
|
||||
assertEq(String.fromCodePoint(0x118B5).toLowerCase().codePointAt(0), 0x118D5); // WARANG CITI CAPITAL LETTER AT, WARANG CITI SMALL LETTER AT
|
||||
assertEq(String.fromCodePoint(0x118B6).toLowerCase().codePointAt(0), 0x118D6); // WARANG CITI CAPITAL LETTER AM, WARANG CITI SMALL LETTER AM
|
||||
assertEq(String.fromCodePoint(0x118B7).toLowerCase().codePointAt(0), 0x118D7); // WARANG CITI CAPITAL LETTER BU, WARANG CITI SMALL LETTER BU
|
||||
assertEq(String.fromCodePoint(0x118B8).toLowerCase().codePointAt(0), 0x118D8); // WARANG CITI CAPITAL LETTER PU, WARANG CITI SMALL LETTER PU
|
||||
assertEq(String.fromCodePoint(0x118B9).toLowerCase().codePointAt(0), 0x118D9); // WARANG CITI CAPITAL LETTER HIYO, WARANG CITI SMALL LETTER HIYO
|
||||
assertEq(String.fromCodePoint(0x118BA).toLowerCase().codePointAt(0), 0x118DA); // WARANG CITI CAPITAL LETTER HOLO, WARANG CITI SMALL LETTER HOLO
|
||||
assertEq(String.fromCodePoint(0x118BB).toLowerCase().codePointAt(0), 0x118DB); // WARANG CITI CAPITAL LETTER HORR, WARANG CITI SMALL LETTER HORR
|
||||
assertEq(String.fromCodePoint(0x118BC).toLowerCase().codePointAt(0), 0x118DC); // WARANG CITI CAPITAL LETTER HAR, WARANG CITI SMALL LETTER HAR
|
||||
assertEq(String.fromCodePoint(0x118BD).toLowerCase().codePointAt(0), 0x118DD); // WARANG CITI CAPITAL LETTER SSUU, WARANG CITI SMALL LETTER SSUU
|
||||
assertEq(String.fromCodePoint(0x118BE).toLowerCase().codePointAt(0), 0x118DE); // WARANG CITI CAPITAL LETTER SII, WARANG CITI SMALL LETTER SII
|
||||
assertEq(String.fromCodePoint(0x118BF).toLowerCase().codePointAt(0), 0x118DF); // WARANG CITI CAPITAL LETTER VIYO, WARANG CITI SMALL LETTER VIYO
|
||||
assertEq(String.fromCodePoint(0x16E40).toLowerCase().codePointAt(0), 0x16E60); // MEDEFAIDRIN CAPITAL LETTER M, MEDEFAIDRIN SMALL LETTER M
|
||||
assertEq(String.fromCodePoint(0x16E41).toLowerCase().codePointAt(0), 0x16E61); // MEDEFAIDRIN CAPITAL LETTER S, MEDEFAIDRIN SMALL LETTER S
|
||||
assertEq(String.fromCodePoint(0x16E42).toLowerCase().codePointAt(0), 0x16E62); // MEDEFAIDRIN CAPITAL LETTER V, MEDEFAIDRIN SMALL LETTER V
|
||||
assertEq(String.fromCodePoint(0x16E43).toLowerCase().codePointAt(0), 0x16E63); // MEDEFAIDRIN CAPITAL LETTER W, MEDEFAIDRIN SMALL LETTER W
|
||||
assertEq(String.fromCodePoint(0x16E44).toLowerCase().codePointAt(0), 0x16E64); // MEDEFAIDRIN CAPITAL LETTER ATIU, MEDEFAIDRIN SMALL LETTER ATIU
|
||||
assertEq(String.fromCodePoint(0x16E45).toLowerCase().codePointAt(0), 0x16E65); // MEDEFAIDRIN CAPITAL LETTER Z, MEDEFAIDRIN SMALL LETTER Z
|
||||
assertEq(String.fromCodePoint(0x16E46).toLowerCase().codePointAt(0), 0x16E66); // MEDEFAIDRIN CAPITAL LETTER KP, MEDEFAIDRIN SMALL LETTER KP
|
||||
assertEq(String.fromCodePoint(0x16E47).toLowerCase().codePointAt(0), 0x16E67); // MEDEFAIDRIN CAPITAL LETTER P, MEDEFAIDRIN SMALL LETTER P
|
||||
assertEq(String.fromCodePoint(0x16E48).toLowerCase().codePointAt(0), 0x16E68); // MEDEFAIDRIN CAPITAL LETTER T, MEDEFAIDRIN SMALL LETTER T
|
||||
assertEq(String.fromCodePoint(0x16E49).toLowerCase().codePointAt(0), 0x16E69); // MEDEFAIDRIN CAPITAL LETTER G, MEDEFAIDRIN SMALL LETTER G
|
||||
assertEq(String.fromCodePoint(0x16E4A).toLowerCase().codePointAt(0), 0x16E6A); // MEDEFAIDRIN CAPITAL LETTER F, MEDEFAIDRIN SMALL LETTER F
|
||||
assertEq(String.fromCodePoint(0x16E4B).toLowerCase().codePointAt(0), 0x16E6B); // MEDEFAIDRIN CAPITAL LETTER I, MEDEFAIDRIN SMALL LETTER I
|
||||
assertEq(String.fromCodePoint(0x16E4C).toLowerCase().codePointAt(0), 0x16E6C); // MEDEFAIDRIN CAPITAL LETTER K, MEDEFAIDRIN SMALL LETTER K
|
||||
assertEq(String.fromCodePoint(0x16E4D).toLowerCase().codePointAt(0), 0x16E6D); // MEDEFAIDRIN CAPITAL LETTER A, MEDEFAIDRIN SMALL LETTER A
|
||||
assertEq(String.fromCodePoint(0x16E4E).toLowerCase().codePointAt(0), 0x16E6E); // MEDEFAIDRIN CAPITAL LETTER J, MEDEFAIDRIN SMALL LETTER J
|
||||
assertEq(String.fromCodePoint(0x16E4F).toLowerCase().codePointAt(0), 0x16E6F); // MEDEFAIDRIN CAPITAL LETTER E, MEDEFAIDRIN SMALL LETTER E
|
||||
assertEq(String.fromCodePoint(0x16E50).toLowerCase().codePointAt(0), 0x16E70); // MEDEFAIDRIN CAPITAL LETTER B, MEDEFAIDRIN SMALL LETTER B
|
||||
assertEq(String.fromCodePoint(0x16E51).toLowerCase().codePointAt(0), 0x16E71); // MEDEFAIDRIN CAPITAL LETTER C, MEDEFAIDRIN SMALL LETTER C
|
||||
assertEq(String.fromCodePoint(0x16E52).toLowerCase().codePointAt(0), 0x16E72); // MEDEFAIDRIN CAPITAL LETTER U, MEDEFAIDRIN SMALL LETTER U
|
||||
assertEq(String.fromCodePoint(0x16E53).toLowerCase().codePointAt(0), 0x16E73); // MEDEFAIDRIN CAPITAL LETTER YU, MEDEFAIDRIN SMALL LETTER YU
|
||||
assertEq(String.fromCodePoint(0x16E54).toLowerCase().codePointAt(0), 0x16E74); // MEDEFAIDRIN CAPITAL LETTER L, MEDEFAIDRIN SMALL LETTER L
|
||||
assertEq(String.fromCodePoint(0x16E55).toLowerCase().codePointAt(0), 0x16E75); // MEDEFAIDRIN CAPITAL LETTER Q, MEDEFAIDRIN SMALL LETTER Q
|
||||
assertEq(String.fromCodePoint(0x16E56).toLowerCase().codePointAt(0), 0x16E76); // MEDEFAIDRIN CAPITAL LETTER HP, MEDEFAIDRIN SMALL LETTER HP
|
||||
assertEq(String.fromCodePoint(0x16E57).toLowerCase().codePointAt(0), 0x16E77); // MEDEFAIDRIN CAPITAL LETTER NY, MEDEFAIDRIN SMALL LETTER NY
|
||||
assertEq(String.fromCodePoint(0x16E58).toLowerCase().codePointAt(0), 0x16E78); // MEDEFAIDRIN CAPITAL LETTER X, MEDEFAIDRIN SMALL LETTER X
|
||||
assertEq(String.fromCodePoint(0x16E59).toLowerCase().codePointAt(0), 0x16E79); // MEDEFAIDRIN CAPITAL LETTER D, MEDEFAIDRIN SMALL LETTER D
|
||||
assertEq(String.fromCodePoint(0x16E5A).toLowerCase().codePointAt(0), 0x16E7A); // MEDEFAIDRIN CAPITAL LETTER OE, MEDEFAIDRIN SMALL LETTER OE
|
||||
assertEq(String.fromCodePoint(0x16E5B).toLowerCase().codePointAt(0), 0x16E7B); // MEDEFAIDRIN CAPITAL LETTER N, MEDEFAIDRIN SMALL LETTER N
|
||||
assertEq(String.fromCodePoint(0x16E5C).toLowerCase().codePointAt(0), 0x16E7C); // MEDEFAIDRIN CAPITAL LETTER R, MEDEFAIDRIN SMALL LETTER R
|
||||
assertEq(String.fromCodePoint(0x16E5D).toLowerCase().codePointAt(0), 0x16E7D); // MEDEFAIDRIN CAPITAL LETTER O, MEDEFAIDRIN SMALL LETTER O
|
||||
assertEq(String.fromCodePoint(0x16E5E).toLowerCase().codePointAt(0), 0x16E7E); // MEDEFAIDRIN CAPITAL LETTER AI, MEDEFAIDRIN SMALL LETTER AI
|
||||
assertEq(String.fromCodePoint(0x16E5F).toLowerCase().codePointAt(0), 0x16E7F); // MEDEFAIDRIN CAPITAL LETTER Y, MEDEFAIDRIN SMALL LETTER Y
|
||||
assertEq(String.fromCodePoint(0x1E900).toLowerCase().codePointAt(0), 0x1E922); // ADLAM CAPITAL LETTER ALIF, ADLAM SMALL LETTER ALIF
|
||||
assertEq(String.fromCodePoint(0x1E901).toLowerCase().codePointAt(0), 0x1E923); // ADLAM CAPITAL LETTER DAALI, ADLAM SMALL LETTER DAALI
|
||||
assertEq(String.fromCodePoint(0x1E902).toLowerCase().codePointAt(0), 0x1E924); // ADLAM CAPITAL LETTER LAAM, ADLAM SMALL LETTER LAAM
|
||||
assertEq(String.fromCodePoint(0x1E903).toLowerCase().codePointAt(0), 0x1E925); // ADLAM CAPITAL LETTER MIIM, ADLAM SMALL LETTER MIIM
|
||||
assertEq(String.fromCodePoint(0x1E904).toLowerCase().codePointAt(0), 0x1E926); // ADLAM CAPITAL LETTER BA, ADLAM SMALL LETTER BA
|
||||
assertEq(String.fromCodePoint(0x1E905).toLowerCase().codePointAt(0), 0x1E927); // ADLAM CAPITAL LETTER SINNYIIYHE, ADLAM SMALL LETTER SINNYIIYHE
|
||||
assertEq(String.fromCodePoint(0x1E906).toLowerCase().codePointAt(0), 0x1E928); // ADLAM CAPITAL LETTER PE, ADLAM SMALL LETTER PE
|
||||
assertEq(String.fromCodePoint(0x1E907).toLowerCase().codePointAt(0), 0x1E929); // ADLAM CAPITAL LETTER BHE, ADLAM SMALL LETTER BHE
|
||||
assertEq(String.fromCodePoint(0x1E908).toLowerCase().codePointAt(0), 0x1E92A); // ADLAM CAPITAL LETTER RA, ADLAM SMALL LETTER RA
|
||||
assertEq(String.fromCodePoint(0x1E909).toLowerCase().codePointAt(0), 0x1E92B); // ADLAM CAPITAL LETTER E, ADLAM SMALL LETTER E
|
||||
assertEq(String.fromCodePoint(0x1E90A).toLowerCase().codePointAt(0), 0x1E92C); // ADLAM CAPITAL LETTER FA, ADLAM SMALL LETTER FA
|
||||
assertEq(String.fromCodePoint(0x1E90B).toLowerCase().codePointAt(0), 0x1E92D); // ADLAM CAPITAL LETTER I, ADLAM SMALL LETTER I
|
||||
assertEq(String.fromCodePoint(0x1E90C).toLowerCase().codePointAt(0), 0x1E92E); // ADLAM CAPITAL LETTER O, ADLAM SMALL LETTER O
|
||||
assertEq(String.fromCodePoint(0x1E90D).toLowerCase().codePointAt(0), 0x1E92F); // ADLAM CAPITAL LETTER DHA, ADLAM SMALL LETTER DHA
|
||||
assertEq(String.fromCodePoint(0x1E90E).toLowerCase().codePointAt(0), 0x1E930); // ADLAM CAPITAL LETTER YHE, ADLAM SMALL LETTER YHE
|
||||
assertEq(String.fromCodePoint(0x1E90F).toLowerCase().codePointAt(0), 0x1E931); // ADLAM CAPITAL LETTER WAW, ADLAM SMALL LETTER WAW
|
||||
assertEq(String.fromCodePoint(0x1E910).toLowerCase().codePointAt(0), 0x1E932); // ADLAM CAPITAL LETTER NUN, ADLAM SMALL LETTER NUN
|
||||
assertEq(String.fromCodePoint(0x1E911).toLowerCase().codePointAt(0), 0x1E933); // ADLAM CAPITAL LETTER KAF, ADLAM SMALL LETTER KAF
|
||||
assertEq(String.fromCodePoint(0x1E912).toLowerCase().codePointAt(0), 0x1E934); // ADLAM CAPITAL LETTER YA, ADLAM SMALL LETTER YA
|
||||
assertEq(String.fromCodePoint(0x1E913).toLowerCase().codePointAt(0), 0x1E935); // ADLAM CAPITAL LETTER U, ADLAM SMALL LETTER U
|
||||
assertEq(String.fromCodePoint(0x1E914).toLowerCase().codePointAt(0), 0x1E936); // ADLAM CAPITAL LETTER JIIM, ADLAM SMALL LETTER JIIM
|
||||
assertEq(String.fromCodePoint(0x1E915).toLowerCase().codePointAt(0), 0x1E937); // ADLAM CAPITAL LETTER CHI, ADLAM SMALL LETTER CHI
|
||||
assertEq(String.fromCodePoint(0x1E916).toLowerCase().codePointAt(0), 0x1E938); // ADLAM CAPITAL LETTER HA, ADLAM SMALL LETTER HA
|
||||
assertEq(String.fromCodePoint(0x1E917).toLowerCase().codePointAt(0), 0x1E939); // ADLAM CAPITAL LETTER QAAF, ADLAM SMALL LETTER QAAF
|
||||
assertEq(String.fromCodePoint(0x1E918).toLowerCase().codePointAt(0), 0x1E93A); // ADLAM CAPITAL LETTER GA, ADLAM SMALL LETTER GA
|
||||
assertEq(String.fromCodePoint(0x1E919).toLowerCase().codePointAt(0), 0x1E93B); // ADLAM CAPITAL LETTER NYA, ADLAM SMALL LETTER NYA
|
||||
assertEq(String.fromCodePoint(0x1E91A).toLowerCase().codePointAt(0), 0x1E93C); // ADLAM CAPITAL LETTER TU, ADLAM SMALL LETTER TU
|
||||
assertEq(String.fromCodePoint(0x1E91B).toLowerCase().codePointAt(0), 0x1E93D); // ADLAM CAPITAL LETTER NHA, ADLAM SMALL LETTER NHA
|
||||
assertEq(String.fromCodePoint(0x1E91C).toLowerCase().codePointAt(0), 0x1E93E); // ADLAM CAPITAL LETTER VA, ADLAM SMALL LETTER VA
|
||||
assertEq(String.fromCodePoint(0x1E91D).toLowerCase().codePointAt(0), 0x1E93F); // ADLAM CAPITAL LETTER KHA, ADLAM SMALL LETTER KHA
|
||||
assertEq(String.fromCodePoint(0x1E91E).toLowerCase().codePointAt(0), 0x1E940); // ADLAM CAPITAL LETTER GBE, ADLAM SMALL LETTER GBE
|
||||
assertEq(String.fromCodePoint(0x1E91F).toLowerCase().codePointAt(0), 0x1E941); // ADLAM CAPITAL LETTER ZAL, ADLAM SMALL LETTER ZAL
|
||||
assertEq(String.fromCodePoint(0x1E920).toLowerCase().codePointAt(0), 0x1E942); // ADLAM CAPITAL LETTER KPO, ADLAM SMALL LETTER KPO
|
||||
assertEq(String.fromCodePoint(0x1E921).toLowerCase().codePointAt(0), 0x1E943); // ADLAM CAPITAL LETTER SHA, ADLAM SMALL LETTER SHA
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
|
||||
@@ -56,6 +56,29 @@ skip script test262/ch10/10.6/10.6-14-b-4-s.js
|
||||
skip script test262/ch10/10.6/10.6-13-b-1-s.js
|
||||
skip script test262/ch10/10.6/10.6-13-b-2-s.js
|
||||
|
||||
# ES2017 Intl legacy constructor semantics changes made these tests invalid
|
||||
# (bug 1328386).
|
||||
skip script test262/intl402/ch10/10.1/10.1.1_1.js
|
||||
skip script test262/intl402/ch10/10.1/10.1.2_a.js
|
||||
skip script test262/intl402/ch11/11.1/11.1.1_1.js
|
||||
skip script test262/intl402/ch12/12.1/12.1.1_1.js
|
||||
|
||||
# Intl.{Collator,DateTimeFormat,NumberFormat}.prototype are now plain objects.
|
||||
skip script test262/intl402/ch10/10.3/10.3_a.js
|
||||
skip script test262/intl402/ch11/11.3/11.3_a.js
|
||||
skip script test262/intl402/ch12/12.3/12.3_a.js
|
||||
|
||||
# Tests already removed upstream (https://github.com/tc39/test262/pull/807/files),
|
||||
# but apparently for the wrong reason.
|
||||
skip script test262/intl402/ch10/10.1/10.1.2.1_4.js
|
||||
skip script test262/intl402/ch11/11.1/11.1.2.1_4.js
|
||||
skip script test262/intl402/ch12/12.1/12.1.2.1_4.js
|
||||
|
||||
# Tests not updated to follow new language tag canonicalisation.
|
||||
skip script test262/intl402/Locale/constructor-non-iana-canon.js
|
||||
skip script test262/intl402/Intl/getCanonicalLocales/preferred-variant.js
|
||||
skip script test262/intl402/Intl/getCanonicalLocales/non-iana-canon.js
|
||||
|
||||
#######################################################################
|
||||
# Tests disabled due to jstest limitations wrt imported test262 tests #
|
||||
#######################################################################
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
// |reftest| skip-if(release_or_beta)
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultCalendar = new Intl.DateTimeFormat(defaultLocale).resolvedOptions().calendar;
|
||||
|
||||
function createWithLocale(locale, calendar) {
|
||||
return new Intl.DateTimeFormat(locale, {calendar});
|
||||
}
|
||||
|
||||
function create(calendar) {
|
||||
return createWithLocale(defaultLocale, calendar);
|
||||
}
|
||||
|
||||
// Empty string should throw.
|
||||
assertThrowsInstanceOf(() => create(""), RangeError);
|
||||
|
||||
// Trailing \0 should throw.
|
||||
assertThrowsInstanceOf(() => create("gregory\0"), RangeError);
|
||||
|
||||
// Too short or too long strings should throw.
|
||||
assertThrowsInstanceOf(() => create("a"), RangeError);
|
||||
assertThrowsInstanceOf(() => create("toolongstring"), RangeError);
|
||||
|
||||
// Throw even when prefix is valid.
|
||||
assertThrowsInstanceOf(() => create("gregory-toolongstring"), RangeError);
|
||||
|
||||
// |calendar| can be set to |undefined|.
|
||||
let dtf = create(undefined);
|
||||
assertEq(dtf.resolvedOptions().calendar, defaultCalendar);
|
||||
|
||||
// Unsupported calendars are ignored.
|
||||
dtf = create("xxxxxxxx");
|
||||
assertEq(dtf.resolvedOptions().calendar, defaultCalendar);
|
||||
|
||||
// Calendars in options overwrite Unicode extension keyword.
|
||||
dtf = createWithLocale(`${defaultLocale}-u-ca-iso8601`, "japanese");
|
||||
assertEq(dtf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(dtf.resolvedOptions().calendar, "japanese");
|
||||
|
||||
// |calendar| option ignores case.
|
||||
dtf = create("CHINESE");
|
||||
assertEq(dtf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(dtf.resolvedOptions().calendar, "chinese");
|
||||
|
||||
const calendars = [
|
||||
"buddhist", "chinese", "coptic", "dangi", "ethioaa", "ethiopic-amete-alem",
|
||||
"ethiopic", "gregory", "hebrew", "indian", "islamic", "islamic-umalqura",
|
||||
"islamic-tbla", "islamic-civil", "islamic-rgsa", "iso8601", "japanese",
|
||||
"persian", "roc", "islamicc",
|
||||
];
|
||||
|
||||
// https://github.com/tc39/proposal-intl-locale/issues/96
|
||||
const canonical = {
|
||||
"islamicc": "islamic-civil",
|
||||
"ethiopic-amete-alem": "ethioaa",
|
||||
};
|
||||
|
||||
for (let calendar of calendars) {
|
||||
let dtf1 = new Intl.DateTimeFormat(`${defaultLocale}-u-ca-${calendar}`);
|
||||
let dtf2 = new Intl.DateTimeFormat(defaultLocale, {calendar});
|
||||
|
||||
assertEq(dtf1.resolvedOptions().calendar, canonical[calendar] ?? calendar);
|
||||
assertEq(dtf2.resolvedOptions().calendar, canonical[calendar] ?? calendar);
|
||||
|
||||
assertEq(dtf2.format(0), dtf1.format(0));
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,64 @@
|
||||
// |reftest| skip-if(release_or_beta)
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultNumberingSystem = new Intl.DateTimeFormat(defaultLocale).resolvedOptions().numberingSystem;
|
||||
|
||||
function createWithLocale(locale, numberingSystem) {
|
||||
return new Intl.DateTimeFormat(locale, {numberingSystem});
|
||||
}
|
||||
|
||||
function create(numberingSystem) {
|
||||
return createWithLocale(defaultLocale, numberingSystem);
|
||||
}
|
||||
|
||||
// Empty string should throw.
|
||||
assertThrowsInstanceOf(() => create(""), RangeError);
|
||||
|
||||
// Trailing \0 should throw.
|
||||
assertThrowsInstanceOf(() => create("latn\0"), RangeError);
|
||||
|
||||
// Too short or too long strings should throw.
|
||||
assertThrowsInstanceOf(() => create("a"), RangeError);
|
||||
assertThrowsInstanceOf(() => create("toolongstring"), RangeError);
|
||||
|
||||
// Throw even when prefix is valid.
|
||||
assertThrowsInstanceOf(() => create("latn-toolongstring"), RangeError);
|
||||
|
||||
// |numberingSystem| can be set to |undefined|.
|
||||
let dtf = create(undefined);
|
||||
assertEq(dtf.resolvedOptions().numberingSystem, defaultNumberingSystem);
|
||||
|
||||
// Unsupported numbering systems are ignored.
|
||||
dtf = create("xxxxxxxx");
|
||||
assertEq(dtf.resolvedOptions().numberingSystem, defaultNumberingSystem);
|
||||
|
||||
// Numbering system in options overwrite Unicode extension keyword.
|
||||
dtf = createWithLocale(`${defaultLocale}-u-nu-thai`, "arab");
|
||||
assertEq(dtf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(dtf.resolvedOptions().numberingSystem, "arab");
|
||||
|
||||
// |numberingSystem| option ignores case.
|
||||
dtf = create("ARAB");
|
||||
assertEq(dtf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(dtf.resolvedOptions().numberingSystem, "arab");
|
||||
|
||||
const numberingSystems = [
|
||||
"arab", "arabext", "bali", "beng", "deva",
|
||||
"fullwide", "gujr", "guru", "hanidec", "khmr",
|
||||
"knda", "laoo", "latn", "limb", "mlym",
|
||||
"mong", "mymr", "orya", "tamldec", "telu",
|
||||
"thai", "tibt",
|
||||
];
|
||||
|
||||
for (let numberingSystem of numberingSystems) {
|
||||
let dtf1 = new Intl.DateTimeFormat(`${defaultLocale}-u-nu-${numberingSystem}`);
|
||||
let dtf2 = new Intl.DateTimeFormat(defaultLocale, {numberingSystem});
|
||||
|
||||
assertEq(dtf1.resolvedOptions().numberingSystem, numberingSystem);
|
||||
assertEq(dtf2.resolvedOptions().numberingSystem, numberingSystem);
|
||||
|
||||
assertEq(dtf2.format(0), dtf1.format(0));
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,11 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
// ApplyOptionsToTag canonicalises the locale identifier before applying the
|
||||
// options. That means "und-Armn-SU" is first canonicalised to "und-Armn-AM",
|
||||
// then the language is changed to "ru". If "ru" were applied first, the result
|
||||
// would be "ru-Armn-RU" instead.
|
||||
assertEq(new Intl.Locale("und-Armn-SU", {language:"ru"}).toString(),
|
||||
"ru-Armn-AM");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,28 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var g = newGlobal();
|
||||
|
||||
var tag = "de-Latn-AT-u-ca-gregory-nu-latn-co-phonebk-kf-false-kn-hc-h23";
|
||||
var locale = new Intl.Locale(tag);
|
||||
var ccwLocale = new g.Intl.Locale(tag);
|
||||
|
||||
for (var [key, {get, value = get}] of Object.entries(Object.getOwnPropertyDescriptors(Intl.Locale.prototype))) {
|
||||
if (typeof value === "function") {
|
||||
if (key !== "constructor") {
|
||||
var expectedValue = value.call(locale);
|
||||
|
||||
if (typeof expectedValue === "string" || typeof expectedValue === "boolean") {
|
||||
assertEq(value.call(ccwLocale), expectedValue, key);
|
||||
} else if (expectedValue instanceof Intl.Locale) {
|
||||
assertEq(value.call(ccwLocale).toString(), expectedValue.toString(), key);
|
||||
} else {
|
||||
throw new Error("unexpected result value");
|
||||
}
|
||||
} else {
|
||||
assertEq(new value(ccwLocale).toString(), new value(locale).toString(), key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,75 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var testData = [
|
||||
{
|
||||
tag: "cel-gaulish",
|
||||
options: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
canonical: "xtg-u-nu-latn-x-cel-gaulish",
|
||||
extensions: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
tag: "cel-gaulish",
|
||||
options: {
|
||||
region: "FR",
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
canonical: "xtg-FR-u-nu-latn-x-cel-gaulish",
|
||||
extensions: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
tag: "art-lojban",
|
||||
options: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
canonical: "jbo-u-nu-latn",
|
||||
extensions: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
tag: "art-lojban",
|
||||
options: {
|
||||
region: "ZZ",
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
canonical: "jbo-ZZ-u-nu-latn",
|
||||
extensions: {
|
||||
numberingSystem: "latn",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
for (var {tag, options, canonical, extensions} of testData) {
|
||||
var loc = new Intl.Locale(tag, options);
|
||||
assertEq(loc.toString(), canonical);
|
||||
|
||||
for (var [name, value] of Object.entries(extensions)) {
|
||||
assertEq(loc[name], value);
|
||||
}
|
||||
}
|
||||
|
||||
var errorTestData = [
|
||||
"en-gb-oed",
|
||||
"i-default",
|
||||
"sgn-ch-de",
|
||||
"zh-min",
|
||||
"zh-min-nan",
|
||||
"zh-hakka-hakka",
|
||||
];
|
||||
|
||||
for (var tag of errorTestData) {
|
||||
assertThrowsInstanceOf(() => new Intl.Locale(tag), RangeError);
|
||||
assertThrowsInstanceOf(() => new Intl.Locale(tag, {}), RangeError);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var testDataMaximal = {
|
||||
// Keeps "und" primary language.
|
||||
"und-AQ": "und-Latn-AQ",
|
||||
|
||||
// Modifies primary language.
|
||||
"und-Cyrl-RO": "bg-Cyrl-RO",
|
||||
}
|
||||
|
||||
var testDataMinimal = {
|
||||
// Undefined primary language.
|
||||
"und": "en",
|
||||
"und-Thai": "th",
|
||||
"und-419": "es-419",
|
||||
"und-150": "ru",
|
||||
"und-AT": "de-AT",
|
||||
|
||||
// https://ssl.icu-project.org/trac/ticket/13786
|
||||
"aae-Latn-IT": "aae-Latn-IT",
|
||||
"aae-Thai-CO": "aae-Thai-CO",
|
||||
|
||||
// https://ssl.icu-project.org/trac/ticket/10220
|
||||
// https://ssl.icu-project.org/trac/ticket/12345
|
||||
"und-CW": "pap-CW",
|
||||
"und-US": "en",
|
||||
"zh-Hant": "zh-TW",
|
||||
"zh-Hani": "zh-Hani",
|
||||
};
|
||||
|
||||
// Add variants, extensions, and privateuse subtags and ensure they don't
|
||||
// modify the result of the likely subtags algorithms.
|
||||
var extras = [
|
||||
"fonipa",
|
||||
"a-not-assigned",
|
||||
"u-attr",
|
||||
"u-co",
|
||||
"u-co-phonebk",
|
||||
"x-private",
|
||||
];
|
||||
|
||||
for (var [tag, maximal] of Object.entries(testDataMaximal)) {
|
||||
assertEq(new Intl.Locale(tag).maximize().toString(), maximal);
|
||||
assertEq(new Intl.Locale(maximal).maximize().toString(), maximal);
|
||||
|
||||
for (var extra of extras) {
|
||||
assertEq(new Intl.Locale(tag + "-" + extra).maximize().toString(), maximal + "-" + extra);
|
||||
}
|
||||
}
|
||||
|
||||
for (var [tag, minimal] of Object.entries(testDataMinimal)) {
|
||||
assertEq(new Intl.Locale(tag).minimize().toString(), minimal);
|
||||
assertEq(new Intl.Locale(minimal).minimize().toString(), minimal);
|
||||
|
||||
for (var extra of extras) {
|
||||
assertEq(new Intl.Locale(tag + "-" + extra).minimize().toString(), minimal + "-" + extra);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,26 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl')||!this.wrapWithProto)
|
||||
|
||||
var tag = "de-Latn-AT-u-ca-gregory-nu-latn-co-phonebk-kf-false-kn-hc-h23";
|
||||
var locale = new Intl.Locale(tag);
|
||||
var scwLocale = wrapWithProto(locale, Intl.Locale.prototype);
|
||||
|
||||
for (var [key, {get, value = get}] of Object.entries(Object.getOwnPropertyDescriptors(Intl.Locale.prototype))) {
|
||||
if (typeof value === "function") {
|
||||
if (key !== "constructor") {
|
||||
var expectedValue = value.call(locale);
|
||||
|
||||
if (typeof expectedValue === "string" || typeof expectedValue === "boolean") {
|
||||
assertEq(value.call(scwLocale), expectedValue, key);
|
||||
} else if (expectedValue instanceof Intl.Locale) {
|
||||
assertEq(value.call(scwLocale).toString(), expectedValue.toString(), key);
|
||||
} else {
|
||||
throw new Error("unexpected result value");
|
||||
}
|
||||
} else {
|
||||
assertEq(new value(scwLocale).toString(), new value(locale).toString(), key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,98 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
function assertProperty(object, name, desc) {
|
||||
assertEq(desc === undefined || (typeof desc === "object" && desc !== null), true,
|
||||
"desc is a property descriptor");
|
||||
|
||||
var actual = Object.getOwnPropertyDescriptor(object, name);
|
||||
if (desc === undefined) {
|
||||
assertEq(actual, desc, `property ${String(name)} is absent`);
|
||||
return;
|
||||
}
|
||||
assertEq(actual !== undefined, true, `property ${String(name)} is present`);
|
||||
|
||||
var fields = ["value", "writable", "enumerable", "configurable", "get", "set"];
|
||||
for (var field of fields) {
|
||||
if (Object.prototype.hasOwnProperty.call(desc, field)) {
|
||||
assertEq(actual[field], desc[field], `unexpected value for ${field}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function assertBuiltinFunction(fn, length, name) {
|
||||
assertProperty(fn, "length", {
|
||||
value: length, writable: false, enumerable: false, configurable: true,
|
||||
});
|
||||
}
|
||||
|
||||
function assertBuiltinMethod(object, propName, length, name) {
|
||||
var desc = Object.getOwnPropertyDescriptor(object, propName);
|
||||
assertProperty(object, propName, {
|
||||
value: desc.value, writable: true, enumerable: false, configurable: true
|
||||
});
|
||||
assertBuiltinFunction(desc.value, length, name);
|
||||
}
|
||||
|
||||
function assertBuiltinGetter(object, propName, length, name) {
|
||||
var desc = Object.getOwnPropertyDescriptor(object, propName);
|
||||
|
||||
assertBuiltinFunction(desc.get, length, name);
|
||||
}
|
||||
|
||||
// Intl.Locale( tag[, options] )
|
||||
assertBuiltinFunction(Intl.Locale, 1, "Locale");
|
||||
|
||||
// Properties of the Intl.Locale Constructor
|
||||
|
||||
// Intl.Locale.prototype
|
||||
assertProperty(Intl.Locale, "prototype", {
|
||||
value: Intl.Locale.prototype, writable: false, enumerable: false, configurable: false,
|
||||
});
|
||||
|
||||
// Properties of the Intl.Locale Prototype Object
|
||||
|
||||
// Intl.Locale.prototype.constructor
|
||||
assertProperty(Intl.Locale.prototype, "constructor", {
|
||||
value: Intl.Locale, writable: true, enumerable: false, configurable: true,
|
||||
});
|
||||
|
||||
// Intl.Locale.prototype[ @@toStringTag ]
|
||||
assertProperty(Intl.Locale.prototype, Symbol.toStringTag, {
|
||||
value: "Intl.Locale", writable: false, enumerable: false, configurable: true,
|
||||
});
|
||||
|
||||
// Intl.Locale.prototype.toString ()
|
||||
assertBuiltinMethod(Intl.Locale.prototype, "toString", 0, "toString");
|
||||
|
||||
// get Intl.Locale.prototype.baseName
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "baseName", 0, "get baseName");
|
||||
|
||||
// get Intl.Locale.prototype.calendar
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "calendar", 0, "get calendar");
|
||||
|
||||
// get Intl.Locale.prototype.collation
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "collation", 0, "get collation");
|
||||
|
||||
// get Intl.Locale.prototype.hourCycle
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "hourCycle", 0, "get hourCycle");
|
||||
|
||||
// get Intl.Locale.prototype.caseFirst
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "caseFirst", 0, "get caseFirst");
|
||||
|
||||
// get Intl.Locale.prototype.numeric
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "numeric", 0, "get numeric");
|
||||
|
||||
// get Intl.Locale.prototype.numberingSystem
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "numberingSystem", 0, "get numberingSystem");
|
||||
|
||||
// get Intl.Locale.prototype.language
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "language", 0, "get language");
|
||||
|
||||
// get Intl.Locale.prototype.script
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "script", 0, "get script");
|
||||
|
||||
// get Intl.Locale.prototype.region
|
||||
assertBuiltinGetter(Intl.Locale.prototype, "region", 0, "get region");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,64 @@
|
||||
// |reftest| skip-if(release_or_beta)
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultNumberingSystem = new Intl.NumberFormat(defaultLocale).resolvedOptions().numberingSystem;
|
||||
|
||||
function createWithLocale(locale, numberingSystem) {
|
||||
return new Intl.NumberFormat(locale, {numberingSystem});
|
||||
}
|
||||
|
||||
function create(numberingSystem) {
|
||||
return createWithLocale(defaultLocale, numberingSystem);
|
||||
}
|
||||
|
||||
// Empty string should throw.
|
||||
assertThrowsInstanceOf(() => create(""), RangeError);
|
||||
|
||||
// Trailing \0 should throw.
|
||||
assertThrowsInstanceOf(() => create("latn\0"), RangeError);
|
||||
|
||||
// Too short or too long strings should throw.
|
||||
assertThrowsInstanceOf(() => create("a"), RangeError);
|
||||
assertThrowsInstanceOf(() => create("toolongstring"), RangeError);
|
||||
|
||||
// Throw even when prefix is valid.
|
||||
assertThrowsInstanceOf(() => create("latn-toolongstring"), RangeError);
|
||||
|
||||
// |numberingSystem| can be set to |undefined|.
|
||||
let nf = create(undefined);
|
||||
assertEq(nf.resolvedOptions().numberingSystem, defaultNumberingSystem);
|
||||
|
||||
// Unsupported numbering systems are ignored.
|
||||
nf = create("xxxxxxxx");
|
||||
assertEq(nf.resolvedOptions().numberingSystem, defaultNumberingSystem);
|
||||
|
||||
// Numbering system in options overwrite Unicode extension keyword.
|
||||
nf = createWithLocale(`${defaultLocale}-u-nu-thai`, "arab");
|
||||
assertEq(nf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(nf.resolvedOptions().numberingSystem, "arab");
|
||||
|
||||
// |numberingSystem| option ignores case.
|
||||
nf = create("ARAB");
|
||||
assertEq(nf.resolvedOptions().locale, defaultLocale);
|
||||
assertEq(nf.resolvedOptions().numberingSystem, "arab");
|
||||
|
||||
const numberingSystems = [
|
||||
"arab", "arabext", "bali", "beng", "deva",
|
||||
"fullwide", "gujr", "guru", "hanidec", "khmr",
|
||||
"knda", "laoo", "latn", "limb", "mlym",
|
||||
"mong", "mymr", "orya", "tamldec", "telu",
|
||||
"thai", "tibt",
|
||||
];
|
||||
|
||||
for (let numberingSystem of numberingSystems) {
|
||||
let nf1 = new Intl.NumberFormat(`${defaultLocale}-u-nu-${numberingSystem}`);
|
||||
let nf2 = new Intl.NumberFormat(defaultLocale, {numberingSystem});
|
||||
|
||||
assertEq(nf1.resolvedOptions().numberingSystem, numberingSystem);
|
||||
assertEq(nf2.resolvedOptions().numberingSystem, numberingSystem);
|
||||
|
||||
assertEq(nf2.format(0), nf1.format(0));
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,107 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
if (typeof getDefaultLocale === "undefined") {
|
||||
var getDefaultLocale = SpecialPowers.Cu.getJSTestingFunctions().getDefaultLocale;
|
||||
}
|
||||
if (typeof setDefaultLocale === "undefined") {
|
||||
var setDefaultLocale = SpecialPowers.Cu.getJSTestingFunctions().setDefaultLocale;
|
||||
}
|
||||
|
||||
let defaultLocale = null;
|
||||
|
||||
function withLocale(locale, fn) {
|
||||
if (defaultLocale === null)
|
||||
defaultLocale = getDefaultLocale();
|
||||
|
||||
setDefaultLocale(locale);
|
||||
try {
|
||||
fn();
|
||||
} finally {
|
||||
setDefaultLocale(defaultLocale);
|
||||
}
|
||||
}
|
||||
|
||||
// This test assumes German ("de") is a supported locale.
|
||||
const supported = Intl.Collator.supportedLocalesOf("de");
|
||||
assertEq(supported.length, 1);
|
||||
assertEq(supported[0], "de");
|
||||
|
||||
withLocale("de", () => {
|
||||
// Ensure the new default locale is now active.
|
||||
assertEq(new Intl.Collator().resolvedOptions().locale, "de");
|
||||
|
||||
// "de" is the active default locale, so explicitly requesting "de" should succeed.
|
||||
assertEq(new Intl.Collator("de").resolvedOptions().locale, "de");
|
||||
|
||||
// ICU doesn't provide a specialised "de-ZA" locale, so we fallback to "de".
|
||||
assertEq(new Intl.Collator("de-ZA").resolvedOptions().locale, "de");
|
||||
|
||||
// ICU doesn't provide a specialised "de-ZA" locale, so we fallback to "de".
|
||||
assertEq(new Intl.Collator("de-ZA-x-private").resolvedOptions().locale, "de");
|
||||
});
|
||||
|
||||
// As demonstrated above, "de-ZA-x-private" normally isn't a supported Intl.Collator locale. But
|
||||
// when used as the default locale, it gets promoted to being supported, because its parent locale
|
||||
// "de" is supported and can act as a fallback.
|
||||
//
|
||||
// This works as follows:
|
||||
// We accept any default locale as long as it can be supported either explicitly or implicitly
|
||||
// through a fallback. But when we claim a default locale is supported, we also need to make sure
|
||||
// we report any parent locale as being supported. So when "de-ZA-x-private" is accepted as the
|
||||
// default locale, we also need to report its parent locale "de-ZA" as a supported locale.
|
||||
//
|
||||
// The reason we're doing this, is to make sure we aren't limiting the supported default locale to
|
||||
// the intersection of the sets of supported locales for each Intl service constructor. Also see
|
||||
// the requirements in <https://tc39.es/ecma402/#sec-internal-slots>, which state that the default
|
||||
// locale must be a member of [[AvailableLocales]] for every Intl service constructor.
|
||||
//
|
||||
// So the following statement must hold:
|
||||
//
|
||||
// ∀ Constructor ∈ IntlConstructors: DefaultLocale ∈ Constructor.[[AvailableLocales]]
|
||||
//
|
||||
// This can trivially be achieved when we restrict the default locale to:
|
||||
//
|
||||
// { RequestedLocale if RequestedLocale ∈ (∩ C.[[AvailableLocales]])
|
||||
// { C ∈ IntlConstructors
|
||||
// {
|
||||
// DefaultLocale = { Fallback(RequestedLocale) if Fallback(RequestedLocale) ∈ (∩ C.[[AvailableLocales]])
|
||||
// { C ∈ IntlConstructors
|
||||
// {
|
||||
// { LastDitchLocale otherwise
|
||||
//
|
||||
// But that severely restricts the possible default locales. For example, "de-CH" is supported by
|
||||
// all Intl constructors except Intl.Collator. Intl.Collator itself only provides explicit support
|
||||
// for the parent locale "de". So with the trivial solution we'd need to mark "de-CH" as an invalid
|
||||
// default locale and instead use its fallback locale "de".
|
||||
//
|
||||
// So instead of that we're using the following approach:
|
||||
//
|
||||
// { RequestedLocale if RequestedLocale ∈ (∩ C.[[AvailableLocales]])
|
||||
// { C ∈ IntlConstructors
|
||||
// {
|
||||
// DefaultLocale = { RequestedLocale if Fallback(RequestedLocale) ∈ (∩ C.[[AvailableLocales]])
|
||||
// { C ∈ IntlConstructors
|
||||
// {
|
||||
// { LastDitchLocale otherwise
|
||||
//
|
||||
// So even when the requested default locale is only implicitly supported through a fallback, we
|
||||
// still accept it as a valid default locale.
|
||||
withLocale("de-ZA-x-private", () => {
|
||||
// Ensure the new default locale is now active.
|
||||
assertEq(new Intl.Collator().resolvedOptions().locale, "de-ZA-x-private");
|
||||
|
||||
// "de-ZA-x-private" is the active default locale, so explicitly requesting the parent locale
|
||||
// "de" should succeed.
|
||||
assertEq(new Intl.Collator("de").resolvedOptions().locale, "de");
|
||||
|
||||
// "de-ZA-x-private" is the active default locale, so explicitly requesting the parent locale
|
||||
// "de-ZA" should succeed.
|
||||
assertEq(new Intl.Collator("de-ZA").resolvedOptions().locale, "de-ZA");
|
||||
|
||||
// "de-ZA-x-private" is the active default locale, so explicitly requesting "de-ZA-x-private"
|
||||
// should succeed.
|
||||
assertEq(new Intl.Collator("de-ZA-x-private").resolvedOptions().locale, "de-ZA-x-private");
|
||||
});
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,74 @@
|
||||
// |reftest| skip-if(!this.getSelfHostedValue)
|
||||
|
||||
const startOfUnicodeExtensions = getSelfHostedValue("startOfUnicodeExtensions");
|
||||
const endOfUnicodeExtensions = getSelfHostedValue("endOfUnicodeExtensions");
|
||||
|
||||
const testcases = [
|
||||
// Language tag without Unicode extension.
|
||||
{ locale: "en", start: -1, end: 0 },
|
||||
{ locale: "en-Latn", start: -1, end: 0 },
|
||||
{ locale: "en-x-y", start: -1, end: 0 },
|
||||
{ locale: "en-x-yz", start: -1, end: 0 },
|
||||
{ locale: "en-x-u-kf", start: -1, end: 0 },
|
||||
|
||||
// Unicode extension sequence starts with key subtag.
|
||||
// - no suceeding key or type subtags.
|
||||
{ locale: "en-u-ab", start: 2, end: 7 },
|
||||
{ locale: "en-u-ab-x-y", start: 2, end: 7 },
|
||||
{ locale: "en-u-ab-x-yz", start: 2, end: 7 },
|
||||
{ locale: "en-u-ab-x-u-kn", start: 2, end: 7 },
|
||||
// - followed by key subtag.
|
||||
{ locale: "en-u-ab-cd", start: 2, end: 10 },
|
||||
{ locale: "en-u-ab-cd-x-y", start: 2, end: 10 },
|
||||
{ locale: "en-u-ab-cd-x-yz", start: 2, end: 10 },
|
||||
{ locale: "en-u-ab-cd-x-u-kn", start: 2, end: 10 },
|
||||
// - followed by type subtag.
|
||||
{ locale: "en-u-ab-cdef", start: 2, end: 12 },
|
||||
{ locale: "en-u-ab-cdef-x-y", start: 2, end: 12 },
|
||||
{ locale: "en-u-ab-cdef-x-yz", start: 2, end: 12 },
|
||||
{ locale: "en-u-ab-cdef-x-y-u-kn", start: 2, end: 12 },
|
||||
|
||||
// Unicode extension sequence starts with attribute subtag.
|
||||
// - no suceeding attribute or key subtags.
|
||||
{ locale: "en-u-abc", start: 2, end: 8 },
|
||||
{ locale: "en-u-abc-x-y", start: 2, end: 8 },
|
||||
{ locale: "en-u-abc-x-yz", start: 2, end: 8 },
|
||||
{ locale: "en-u-abc-x-y-u-kn", start: 2, end: 8 },
|
||||
// - followed by attribute subtag.
|
||||
{ locale: "en-u-abc-def", start: 2, end: 12 },
|
||||
{ locale: "en-u-abc-def-x-y", start: 2, end: 12 },
|
||||
{ locale: "en-u-abc-def-x-yz", start: 2, end: 12 },
|
||||
{ locale: "en-u-abc-def-x-y-u-kn", start: 2, end: 12 },
|
||||
// - followed by key subtag.
|
||||
{ locale: "en-u-abc-de", start: 2, end: 11 },
|
||||
{ locale: "en-u-abc-de-x-y", start: 2, end: 11 },
|
||||
{ locale: "en-u-abc-de-x-yz", start: 2, end: 11 },
|
||||
{ locale: "en-u-abc-de-x-y-u-kn", start: 2, end: 11 },
|
||||
// - followed by two key subtags.
|
||||
{ locale: "en-u-abc-de-fg", start: 2, end: 14 },
|
||||
{ locale: "en-u-abc-de-fg-x-y", start: 2, end: 14 },
|
||||
{ locale: "en-u-abc-de-fg-x-yz", start: 2, end: 14 },
|
||||
{ locale: "en-u-abc-de-fg-x-y-u-kn", start: 2, end: 14 },
|
||||
// - followed by key and type subtag.
|
||||
{ locale: "en-u-abc-de-fgh", start: 2, end: 15 },
|
||||
{ locale: "en-u-abc-de-fgh-x-y", start: 2, end: 15 },
|
||||
{ locale: "en-u-abc-de-fgh-x-yz", start: 2, end: 15 },
|
||||
{ locale: "en-u-abc-de-fgh-x-y-u-kn", start: 2, end: 15 },
|
||||
|
||||
// Also test when the Unicode extension doesn't start at index 2.
|
||||
{ locale: "en-Latn-u-kf", start: 7, end: 12 },
|
||||
{ locale: "und-u-kf", start: 3, end: 8 },
|
||||
];
|
||||
|
||||
for (const {locale, start, end} of testcases) {
|
||||
// Ensure the input is a valid language tag.
|
||||
assertEqArray(Intl.getCanonicalLocales(locale), [locale]);
|
||||
|
||||
assertEq(startOfUnicodeExtensions(locale), start);
|
||||
|
||||
if (start >= 0)
|
||||
assertEq(endOfUnicodeExtensions(locale, start), end);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,47 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Language tags are processed case-insensitive, but unconditionally calling
|
||||
// the built-in String.prototype.toLowerCase() or toUpperCase() function
|
||||
// before parsing a language tag can map non-ASCII characters into the ASCII
|
||||
// range.
|
||||
//
|
||||
// Validate the Unicode BCP 47 locale identifier parser handles this case
|
||||
// (pun intended) correctly by passing language tags which contain
|
||||
// U+212A (KELVIN SIGN) and U+0131 (LATIN SMALL LETTER DOTLESS I) to
|
||||
// Intl.getCanonicalLocales().
|
||||
|
||||
// The lower-case form of "i-ha\u212A" is "i-hak".
|
||||
assertEq("i-hak", "i-ha\u212A".toLowerCase());
|
||||
|
||||
// The upper-case form of "\u0131-hak" is "I-HAK".
|
||||
assertEq("I-HAK", "\u0131-hak".toUpperCase());
|
||||
|
||||
// "i-hak" is not a valid Unicode BCP 47 locale identifier.
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("i-hak"), RangeError);
|
||||
|
||||
// And neither is "i-ha\u212A".
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("i-ha\u212A"), RangeError);
|
||||
|
||||
// And also "\u0131-hak" isn't valid.
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("\u0131-hak"), RangeError);
|
||||
|
||||
// The lower-case form of "zh-ha\u212A\u212Aa" is "zh-hakka".
|
||||
assertEq("zh-hakka", "zh-ha\u212A\u212Aa".toLowerCase());
|
||||
|
||||
// "zh-hakka" is a valid Unicode BCP 47 locale identifier.
|
||||
assertEqArray(Intl.getCanonicalLocales("zh-hakka"), ["hak"]);
|
||||
|
||||
// But "zh-ha\u212A\u212Aa" is not a valid locale identifier.
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("zh-ha\u212A\u212Aa"), RangeError);
|
||||
|
||||
// The lower-case form of "zh-x\u0131ang" is "ZH-XIANG".
|
||||
assertEq("ZH-XIANG", "zh-x\u0131ang".toUpperCase());
|
||||
|
||||
// "zh-xiang" is a valid Unicode BCP 47 locale identifier.
|
||||
assertEqArray(Intl.getCanonicalLocales("zh-xiang"), ["hsn"]);
|
||||
|
||||
// But "zh-x\u0131ang" is not a valid locale identifier.
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("zh-x\u0131ang"), RangeError);
|
||||
|
||||
if (typeof reportCompare === 'function')
|
||||
reportCompare(0, 0);
|
||||
@@ -0,0 +1,21 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Unicode BCP 47 locale identifiers don't support extlang subtags.
|
||||
const invalid = [
|
||||
// Two letter language code followed by extlang subtags.
|
||||
"en-abc",
|
||||
"en-abc-def",
|
||||
"en-abc-def-ghi",
|
||||
|
||||
// Three letter language code followed by extlang subtags.
|
||||
"und-abc",
|
||||
"und-abc-def",
|
||||
"und-abc-def-ghi",
|
||||
];
|
||||
|
||||
for (let locale of invalid) {
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales(locale), RangeError);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,52 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Unicode BCP 47 locale identifiers don't support irregular grandfathered tags.
|
||||
var irregularGrandfathered = [
|
||||
"en-gb-oed",
|
||||
"i-ami",
|
||||
"i-bnn",
|
||||
"i-default",
|
||||
"i-enochian",
|
||||
"i-hak",
|
||||
"i-klingon",
|
||||
"i-lux",
|
||||
"i-mingo",
|
||||
"i-navajo",
|
||||
"i-pwn",
|
||||
"i-tao",
|
||||
"i-tay",
|
||||
"i-tsu",
|
||||
"sgn-be-fr",
|
||||
"sgn-be-nl",
|
||||
"sgn-ch-de",
|
||||
];
|
||||
|
||||
// Unicode BCP 47 locale identifiers don't support regular grandfathered tags
|
||||
// which contain an extlang-like subtag.
|
||||
var regularGrandfatheredWithExtlangLike = [
|
||||
"no-bok",
|
||||
"no-nyn",
|
||||
"zh-min",
|
||||
"zh-min-nan",
|
||||
];
|
||||
|
||||
// Unicode BCP 47 locale identifiers do support regular grandfathered tags
|
||||
// which contain a variant-like subtag.
|
||||
var regularGrandfatheredWithVariantLike = {
|
||||
"art-lojban": "jbo",
|
||||
"cel-gaulish": "xtg-x-cel-gaulish",
|
||||
"zh-guoyu": "zh",
|
||||
"zh-hakka": "hak",
|
||||
"zh-xiang": "hsn",
|
||||
};
|
||||
|
||||
for (let locale of [...irregularGrandfathered, ...regularGrandfatheredWithExtlangLike]) {
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales(locale), RangeError);
|
||||
}
|
||||
|
||||
for (let [locale, canonical] of Object.entries(regularGrandfatheredWithVariantLike)) {
|
||||
assertEq(Intl.getCanonicalLocales(locale)[0], canonical);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,39 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// For the most part the mappings from IANA are a subset of the CLDR mappings.
|
||||
// So there are mappings which are consistent across both databases.
|
||||
assertEq(Intl.getCanonicalLocales("iw")[0], "he");
|
||||
|
||||
// But some languages are mapped differently.
|
||||
//
|
||||
// From the IANA language data registry:
|
||||
// Type: language
|
||||
// Subtag: drh
|
||||
// Description: Darkhat
|
||||
// Added: 2009-07-29
|
||||
// Deprecated: 2010-03-11
|
||||
// Preferred-Value: khk
|
||||
//
|
||||
// From CLDR:
|
||||
// <languageAlias type="drh" replacement="mn" reason="deprecated"/>
|
||||
//
|
||||
// because CLDR also maps macro-languages:
|
||||
// <languageAlias type="khk" replacement="mn" reason="macrolanguage"/>
|
||||
assertEq(Intl.getCanonicalLocales("drh")[0], "mn");
|
||||
|
||||
// CLDR maps macro-languages:
|
||||
// <languageAlias type="cmn" replacement="zh" reason="macrolanguage"/>
|
||||
assertEq(Intl.getCanonicalLocales("cmn")[0], "zh");
|
||||
|
||||
// CLDR also contains mappings from ISO-639-2 (B/T) to 639-1 codes:
|
||||
// <languageAlias type="dut" replacement="nl" reason="bibliographic"/>
|
||||
// <languageAlias type="nld" replacement="nl" reason="overlong"/>
|
||||
assertEq(Intl.getCanonicalLocales("dut")[0], "nl");
|
||||
assertEq(Intl.getCanonicalLocales("nld")[0], "nl");
|
||||
|
||||
// CLDR has additional mappings for legacy language codes.
|
||||
// <languageAlias type="no" replacement="nb" reason="legacy"/>
|
||||
assertEq(Intl.getCanonicalLocales("no")[0], "nb");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,21 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// CLDR contains language mappings where in addition to the language subtag also
|
||||
// the script or region subtag is modified, unless they're already present.
|
||||
|
||||
// <languageAlias type="sh" replacement="sr_Latn" reason="legacy"/>
|
||||
assertEq(Intl.getCanonicalLocales("sh")[0], "sr-Latn");
|
||||
assertEq(Intl.getCanonicalLocales("sh-RS")[0], "sr-Latn-RS");
|
||||
assertEq(Intl.getCanonicalLocales("sh-Cyrl")[0], "sr-Cyrl");
|
||||
|
||||
// <languageAlias type="cnr" replacement="sr_ME" reason="legacy"/>
|
||||
assertEq(Intl.getCanonicalLocales("cnr")[0], "sr-ME");
|
||||
assertEq(Intl.getCanonicalLocales("cnr-Latn")[0], "sr-Latn-ME");
|
||||
assertEq(Intl.getCanonicalLocales("cnr-RS")[0], "sr-RS");
|
||||
|
||||
// Aliases where more than just a language subtag are present are ignored.
|
||||
// <languageAlias type="sr_RS" replacement="sr_Cyrl_RS" reason="legacy"/>
|
||||
assertEq(Intl.getCanonicalLocales("sr-RS")[0], "sr-RS");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,57 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// CLDR contains region mappings where the replacement region depends on the
|
||||
// likely subtags from the language and script subtags.
|
||||
//
|
||||
// For example, the breakup of the Soviet Union ("SU") means that the region of
|
||||
// the Soviet Union ("SU") is replaced by Russia ("RU"), Armenia ("AM"), or
|
||||
// many others -- depending on the specified (or merely likely) language and
|
||||
// script subtags:
|
||||
//
|
||||
// <territoryAlias type="SU" replacement="RU AM AZ BY EE GE KZ KG LV LT MD TJ TM UA UZ" reason="deprecated"/>
|
||||
//
|
||||
// Armenia can be the preferred region when the language is "hy" (Armenian) or
|
||||
// the script is "Armn" (Armenian).
|
||||
//
|
||||
// <likelySubtag from="hy" to="hy_Armn_AM"/>
|
||||
// <likelySubtag from="und_Armn" to="hy_Armn_AM"/>
|
||||
assertEq(Intl.getCanonicalLocales("ru-SU")[0], "ru-RU");
|
||||
assertEq(Intl.getCanonicalLocales("en-SU")[0], "en-RU");
|
||||
assertEq(Intl.getCanonicalLocales("und-SU")[0], "und-RU");
|
||||
assertEq(Intl.getCanonicalLocales("und-Latn-SU")[0], "und-Latn-RU");
|
||||
assertEq(Intl.getCanonicalLocales("hy-SU")[0], "hy-AM");
|
||||
assertEq(Intl.getCanonicalLocales("und-Armn-SU")[0], "und-Armn-AM");
|
||||
|
||||
// <territoryAlias type="CS" replacement="RS ME" reason="deprecated"/>
|
||||
//
|
||||
// The following likely-subtags entries contain "RS" and "ME":
|
||||
//
|
||||
// <likelySubtag from="sr" to="sr_Cyrl_RS"/>
|
||||
// <likelySubtag from="sr_ME" to="sr_Latn_ME"/>
|
||||
// <likelySubtag from="und_RS" to="sr_Cyrl_RS"/>
|
||||
// <likelySubtag from="und_ME" to="sr_Latn_ME"/>
|
||||
//
|
||||
// In this case there is no language/script combination (without a region
|
||||
// subtag) where "ME" is ever chosen, so the replacement is always "RS".
|
||||
assertEq(Intl.getCanonicalLocales("sr-CS")[0], "sr-RS");
|
||||
assertEq(Intl.getCanonicalLocales("sr-Latn-CS")[0], "sr-Latn-RS");
|
||||
assertEq(Intl.getCanonicalLocales("sr-Cyrl-CS")[0], "sr-Cyrl-RS");
|
||||
|
||||
// The existing region in the source locale identifier is ignored when selecting
|
||||
// the likely replacement region. For example take "az-NT", which is Azerbaijani
|
||||
// spoken in the Neutral Zone. The replacement region for "NT" is either
|
||||
// "SA" (Saudi-Arabia) or "IQ" (Iraq), and there is also a likely subtags entry
|
||||
// for "az-IQ". But when only looking at the language subtag in "az-NT", "az" is
|
||||
// always resolved to "az-Latn-AZ", and because "AZ" is not in the list ["SA",
|
||||
// "IQ"], the final replacement region is the default for "NT", namely "SA".
|
||||
// That means "az-NT" will be canonicalised to "az-SA" and not "az-IQ", even
|
||||
// though the latter may be a more sensible candidate based on the actual usage
|
||||
// of the target locales.
|
||||
//
|
||||
// <territoryAlias type="NT" replacement="SA IQ" reason="deprecated"/>
|
||||
// <likelySubtag from="az_IQ" to="az_Arab_IQ"/>
|
||||
// <likelySubtag from="az" to="az_Latn_AZ"/>
|
||||
assertEq(Intl.getCanonicalLocales("az-NT")[0], "az-SA");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,22 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// For the most part the mappings from IANA are a subset of the CLDR mappings.
|
||||
// So there are mappings which are consistent across both databases.
|
||||
assertEq(Intl.getCanonicalLocales("de-DD")[0], "de-DE");
|
||||
|
||||
// CLDR contains additional mappings:
|
||||
// <territoryAlias type="QU" replacement="EU" reason="deprecated"/>
|
||||
// <territoryAlias type="UK" replacement="GB" reason="deprecated"/>
|
||||
assertEq(Intl.getCanonicalLocales("und-QU")[0], "und-EU");
|
||||
assertEq(Intl.getCanonicalLocales("en-UK")[0], "en-GB");
|
||||
|
||||
// CLDR additional maps ISO 3166-1 numeric to ISO 3166-1 alpha-2 codes:
|
||||
// <territoryAlias type="280" replacement="DE" reason="deprecated"/>
|
||||
// <territoryAlias type="278" replacement="DE" reason="overlong"/>
|
||||
// <territoryAlias type="276" replacement="DE" reason="overlong"/>
|
||||
assertEq(Intl.getCanonicalLocales("de-280")[0], "de-DE");
|
||||
assertEq(Intl.getCanonicalLocales("de-278")[0], "de-DE");
|
||||
assertEq(Intl.getCanonicalLocales("de-276")[0], "de-DE");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,18 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// The IANA language subtag registry contains replacements for sign language
|
||||
// codes marked as redundant. For example:
|
||||
//
|
||||
// Type: redundant
|
||||
// Tag: sgn-DE
|
||||
// Description: German Sign Language
|
||||
// Added: 2001-11-11
|
||||
// Deprecated: 2009-07-29
|
||||
// Preferred-Value: gsg
|
||||
//
|
||||
// CLDR doesn't contain these mappings. Make sure we follow CLDR instead of IANA.
|
||||
|
||||
assertEq(Intl.getCanonicalLocales("sgn-DE")[0], "sgn-DE");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,71 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
const invalid = [
|
||||
// empty
|
||||
"en-t",
|
||||
"en-t-a",
|
||||
"en-t-x",
|
||||
"en-t-0",
|
||||
|
||||
// incomplete
|
||||
"en-t-",
|
||||
"en-t-en-",
|
||||
"en-t-0x-",
|
||||
|
||||
// tlang: unicode_language_subtag must be 2-3 or 5-8 characters and mustn't
|
||||
// contain extlang subtags.
|
||||
"en-t-root",
|
||||
"en-t-abcdefghi",
|
||||
"en-t-ar-aao",
|
||||
|
||||
// tlang: unicode_script_subtag must be 4 alphabetical characters, can't
|
||||
// be repeated.
|
||||
"en-t-en-lat0",
|
||||
"en-t-en-latn-latn",
|
||||
|
||||
// tlang: unicode_region_subtag must either be 2 alpha characters or a three
|
||||
// digit code.
|
||||
"en-t-en-0",
|
||||
"en-t-en-00",
|
||||
"en-t-en-0x",
|
||||
"en-t-en-x0",
|
||||
"en-t-en-latn-0",
|
||||
"en-t-en-latn-00",
|
||||
"en-t-en-latn-xyz",
|
||||
|
||||
// tlang: unicode_variant_subtag is either 5-8 alphanum characters or 4
|
||||
// characters starting with a digit.
|
||||
"en-t-en-abcdefghi",
|
||||
"en-t-en-latn-gb-ab",
|
||||
"en-t-en-latn-gb-abc",
|
||||
"en-t-en-latn-gb-abcd",
|
||||
"en-t-en-latn-gb-abcdefghi",
|
||||
];
|
||||
|
||||
// Canonicalisation also applies for the transformation extension. But also
|
||||
// see <https://github.com/tc39/ecma402/issues/330>.
|
||||
const valid = [
|
||||
{locale: "en-t-en", canonical: "en-t-en"},
|
||||
{locale: "en-t-en-latn", canonical: "en-t-en-latn"},
|
||||
{locale: "en-t-en-ca", canonical: "en-t-en-ca"},
|
||||
{locale: "en-t-en-latn-ca", canonical: "en-t-en-latn-ca"},
|
||||
{locale: "en-t-en-emodeng", canonical: "en-t-en-emodeng"},
|
||||
{locale: "en-t-en-latn-emodeng", canonical: "en-t-en-latn-emodeng"},
|
||||
{locale: "en-t-en-latn-ca-emodeng", canonical: "en-t-en-latn-ca-emodeng"},
|
||||
{locale: "sl-t-sl-rozaj-biske-1994", canonical: "sl-t-sl-1994-biske-rozaj"},
|
||||
{locale: "DE-T-M0-DIN-K0-QWERTZ", canonical: "de-t-k0-qwertz-m0-din"},
|
||||
{locale: "en-t-m0-true", canonical: "en-t-m0-true"},
|
||||
{locale: "en-t-iw", canonical: "en-t-he"},
|
||||
{locale: "und-Latn-t-und-hani-m0-names", canonical: "und-Latn-t-und-hani-m0-prprname"},
|
||||
];
|
||||
|
||||
for (let locale of invalid) {
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales(locale), RangeError);
|
||||
}
|
||||
|
||||
for (let {locale, canonical} of valid) {
|
||||
assertEq(Intl.getCanonicalLocales(locale)[0], canonical);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,12 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Unicode locale extension sequences don't allow keys with a digit as their
|
||||
// second character.
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("en-u-c0"), RangeError);
|
||||
assertThrowsInstanceOf(() => Intl.getCanonicalLocales("en-u-00"), RangeError);
|
||||
|
||||
// The first character is allowed to be a digit.
|
||||
assertEq(Intl.getCanonicalLocales("en-u-0c")[0], "en-u-0c");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,15 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// ECMA-402 includes mapping of legacy variants, as long as they're also present
|
||||
// in <variantAlias> in CLDR's supplementalMetadata.xml
|
||||
// <https://www.unicode.org/reports/tr35/#Legacy_Variants>
|
||||
|
||||
assertEq(Intl.getCanonicalLocales("sv-AALAND")[0], "sv-AX");
|
||||
assertEq(Intl.getCanonicalLocales("no-BOKMAL")[0], "nb-bokmal");
|
||||
assertEq(Intl.getCanonicalLocales("no-NYNORSK")[0], "nb-nynorsk");
|
||||
assertEq(Intl.getCanonicalLocales("en-POSIX")[0], "en-posix");
|
||||
assertEq(Intl.getCanonicalLocales("el-POLYTONI")[0], "el-polyton");
|
||||
assertEq(Intl.getCanonicalLocales("aa-SAAHO")[0], "aa-saaho");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,31 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// UTS 35, 3.2.1 Canonical Unicode Locale Identifiers:
|
||||
// - Any variants are in alphabetical order.
|
||||
|
||||
assertEq(Intl.getCanonicalLocales("en-scouse-fonipa")[0], "en-fonipa-scouse");
|
||||
|
||||
// Sorting in alphabetical order may turn a valid BCP 47 language tag into a
|
||||
// BCP 47 language tag which is only well-formed, but no longer valid. This
|
||||
// means there are potential compatibility issues when converting between
|
||||
// Unicode BCP 47 locale identifiers and BCP 47 language tags.
|
||||
//
|
||||
// Spec: https://tools.ietf.org/html/rfc5646#section-2.2.9
|
||||
|
||||
// <https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry>
|
||||
//
|
||||
// Type: variant
|
||||
// Subtag: 1994
|
||||
// Description: Standardized Resian orthography
|
||||
// Added: 2007-07-28
|
||||
// Prefix: sl-rozaj
|
||||
// Prefix: sl-rozaj-biske
|
||||
// Prefix: sl-rozaj-njiva
|
||||
// Prefix: sl-rozaj-osojs
|
||||
// Prefix: sl-rozaj-solba
|
||||
// Comments: For standardized Resian an orthography was published in 1994.
|
||||
|
||||
assertEq(Intl.getCanonicalLocales("sl-rozaj-biske-1994")[0], "sl-1994-biske-rozaj");
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,58 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||
|
||||
// Per UTS 35, computing the canonical form for Unicode BCP 47 locale identifiers
|
||||
// includes replacing deprecated variant mappings. The other UTS 35 canonicalisation
|
||||
// algorithm ("BCP 47 Language Tag to Unicode BCP 47 Locale Identifier") doesn't
|
||||
// support deprecated variant mappings.
|
||||
// https://github.com/tc39/ecma402/issues/330
|
||||
|
||||
const languageTags = {
|
||||
// The preferred value of "hy-arevela" is "hy" per CLDR.
|
||||
"hy-arevela": "hy",
|
||||
"hy-Armn-arevela": "hy-Armn",
|
||||
"hy-AM-arevela": "hy-AM",
|
||||
"hy-arevela-fonipa": "hy-fonipa",
|
||||
"hy-fonipa-arevela": "hy-fonipa",
|
||||
|
||||
// The preferred value of "hy-arevmda" is "hyw" per CLDR.
|
||||
"hy-arevmda": "hyw",
|
||||
"hy-Armn-arevmda": "hyw-Armn",
|
||||
"hy-AM-arevmda": "hyw-AM",
|
||||
"hy-arevmda-fonipa": "hyw-fonipa",
|
||||
"hy-fonipa-arevmda": "hyw-fonipa",
|
||||
|
||||
// The preferred value of "ja-Latn-hepburn-heploc" is "ja-Latn-alalc97-hepburn" per CLDR.
|
||||
// But: The preferred value of "ja-Latn-hepburn-heploc" is "ja-Latn-alalc97" per IANA!
|
||||
"ja-Latn-hepburn-heploc": "ja-Latn-alalc97-hepburn",
|
||||
"ja-Latn-JP-hepburn-heploc": "ja-Latn-JP-alalc97-hepburn",
|
||||
|
||||
// Variant subtag replacements not present in IANA.
|
||||
"sv-aaland": "sv-AX",
|
||||
"el-polytoni": "el-polyton",
|
||||
|
||||
// Additional cases when more variant subtags are present.
|
||||
|
||||
// 1. The preferred variant is already present.
|
||||
"ja-Latn-alalc97-hepburn-heploc": "ja-Latn-alalc97-hepburn",
|
||||
"ja-Latn-hepburn-alalc97-heploc": "ja-Latn-alalc97-hepburn",
|
||||
"ja-Latn-hepburn-heploc-alalc97": "ja-Latn-alalc97-hepburn",
|
||||
|
||||
// 2. The variant subtags aren't in the expected order per IANA. (CLDR doesn't care
|
||||
// about the order of variant subtags.)
|
||||
"ja-Latn-heploc-hepburn": "ja-Latn-alalc97-hepburn",
|
||||
|
||||
// 3. IANA expects both variant subtags to be present, CLDR only requires "heploc".
|
||||
"ja-Latn-heploc": "ja-Latn-alalc97",
|
||||
|
||||
// 4. Test for cases when the same variant subtag position needs to be checked more
|
||||
// than once when replacing deprecated variant subtags.
|
||||
"ja-Latn-aaland-heploc": "ja-Latn-AX-alalc97",
|
||||
"ja-Latn-heploc-polytoni": "ja-Latn-alalc97-polyton",
|
||||
};
|
||||
|
||||
for (let [tag, canonical] of Object.entries(languageTags)) {
|
||||
assertEq(Intl.getCanonicalLocales(tag)[0], canonical);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
Reference in New Issue
Block a user