mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1923907 - Part 18: Add missing Intl checks in non262 tests. r=spidermonkey-reviewers,jandem
That way the tests can pass when building with `--without-intl-api`. Differential Revision: https://phabricator.services.mozilla.com/D225260
This commit is contained in:
parent
cf3cff3d64
commit
f13f7790f1
@ -1,4 +1,4 @@
|
||||
// |reftest| skip-if(winWidget) -- Windows doesn't accept IANA names for the TZ env variable
|
||||
// |reftest| skip-if(winWidget||!this.hasOwnProperty('Intl')) -- Windows doesn't accept IANA names for the TZ env variable
|
||||
|
||||
const testCases = [
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// |reftest| skip-if(winWidget||!xulRuntime.shell)
|
||||
// |reftest| skip-if(winWidget||!xulRuntime.shell||!this.hasOwnProperty('Intl'))
|
||||
|
||||
assertEq(/^(PST|PDT)$/.test(getTimeZone()), true,
|
||||
"The default time zone is set to PST8PDT for all jstests (when run in the shell)");
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultCalendar = new Intl.DateTimeFormat(defaultLocale).resolvedOptions().calendar;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultNumberingSystem = new Intl.DateTimeFormat(defaultLocale).resolvedOptions().numberingSystem;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
for (let [numberingSystem, {digits, algorithmic}] of Object.entries(numberingSystems)) {
|
||||
if (algorithmic) {
|
||||
// We don't yet support algorithmic numbering systems.
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultNumberingSystem = new Intl.NumberFormat(defaultLocale).resolvedOptions().numberingSystem;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
const defaultLocale = "en";
|
||||
const defaultNumberingSystem = new Intl.RelativeTimeFormat(defaultLocale).resolvedOptions().numberingSystem;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// |reftest| skip-if(!this.getSelfHostedValue)
|
||||
// |reftest| skip-if(!this.getSelfHostedValue||!this.hasOwnProperty('Intl'))
|
||||
|
||||
const startOfUnicodeExtensions = getSelfHostedValue("startOfUnicodeExtensions");
|
||||
const endOfUnicodeExtensions = getSelfHostedValue("endOfUnicodeExtensions");
|
||||
|
@ -11,7 +11,7 @@ function assertThrowsWithMessage(f, msg) {
|
||||
try {
|
||||
f();
|
||||
} catch (exc) {
|
||||
if (exc.message.normalize() === msg.normalize())
|
||||
if (exc.message === msg)
|
||||
return;
|
||||
|
||||
fullmsg = `Assertion failed: expected message '${msg}', got '${exc.message}'`;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var BUGNUMBER = 1338779;
|
||||
var summary = "Non-Latin1 to Latin1 mapping in ignoreCase.";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var BUGNUMBER = 1135377;
|
||||
var summary = "Implement RegExp unicode flag -- ignoreCase flag for CharacterClass.";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var BUGNUMBER = 1135377;
|
||||
var summary = "Implement RegExp unicode flag -- ignoreCase flag with non-ascii to ascii map.";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var BUGNUMBER = 1135377;
|
||||
var summary = "Implement RegExp unicode flag -- ignoreCase flag with character class escape.";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
var BUGNUMBER = 1338373;
|
||||
var summary = "Word boundary should match U+017F and U+212A in unicode+ignoreCase.";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// |reftest| skip-if(!this.hasOwnProperty('Intl'))
|
||||
|
||||
/* Generated by make_unicode.py DO NOT MODIFY */
|
||||
/* Unicode version: 15.0.0 */
|
||||
|
||||
|
@ -1141,6 +1141,7 @@ def make_icase_test(version, folding_tests, codepoint_table):
|
||||
|
||||
file_name = "../tests/non262/RegExp/unicode-ignoreCase.js"
|
||||
with io.open(file_name, mode="w", encoding="utf-8") as test_icase:
|
||||
test_icase.write("// |reftest| skip-if(!this.hasOwnProperty('Intl'))\n\n")
|
||||
test_icase.write(warning_message)
|
||||
test_icase.write(unicode_version_message.format(version))
|
||||
test_icase.write(public_domain)
|
||||
|
Loading…
Reference in New Issue
Block a user