mirror of
https://github.com/tc39/test262.git
synced 2025-05-19 14:20:31 +02:00
Change test for -kn (#1995)
Add test for case of -kn-true Verify no -kn-true nor -kn-false in the returned locale. Change expectation per https://github.com/tc39/ecma402/pull/302
This commit is contained in:
parent
b7c9c6c78b
commit
116c95d97c
@ -10,7 +10,7 @@ description: >
|
|||||||
author: Norbert Lindenberg
|
author: Norbert Lindenberg
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var extensions = ["-u-co-phonebk-kn", "-u-kn-co-phonebk"];
|
var extensions = ["-u-co-phonebk-kn", "-u-kn-co-phonebk", "-u-co-phonebk-kn-true", "-u-kn-true-co-phonebk"];
|
||||||
extensions.forEach(function (extension) {
|
extensions.forEach(function (extension) {
|
||||||
var defaultLocale = new Intl.Collator().resolvedOptions().locale;
|
var defaultLocale = new Intl.Collator().resolvedOptions().locale;
|
||||||
var collator = new Intl.Collator([defaultLocale + extension], {usage: "sort"});
|
var collator = new Intl.Collator([defaultLocale + extension], {usage: "sort"});
|
||||||
@ -18,6 +18,8 @@ extensions.forEach(function (extension) {
|
|||||||
var numeric = collator.resolvedOptions().numeric;
|
var numeric = collator.resolvedOptions().numeric;
|
||||||
if (numeric !== undefined) {
|
if (numeric !== undefined) {
|
||||||
assert.sameValue(numeric, true, "Default value for \"kn\" should be true, but is " + numeric + ".");
|
assert.sameValue(numeric, true, "Default value for \"kn\" should be true, but is " + numeric + ".");
|
||||||
assert.sameValue(locale.indexOf("-kn"), -1, "\"kn\" is returned in locale, but shouldn't be.");
|
assert.sameValue(locale.indexOf("-kn-false"), -1, "\"kn-false\" is returned in locale, but shouldn't be.");
|
||||||
|
assert.sameValue(locale.indexOf("-kn-true"), -1, "\"kn-true\" is returned in locale, but shouldn't be.");
|
||||||
|
assert.sameValue(locale.indexOf("-kn") >= 0, true, "\"kn\" should be returned in locale.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user