Skip to content
Snippets Groups Projects
Commit 116c95d9 authored by Frank Yung-Fong Tang's avatar Frank Yung-Fong Tang Committed by Leo Balter
Browse files

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
parent b7c9c6c7
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ description: >
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) {
var defaultLocale = new Intl.Collator().resolvedOptions().locale;
var collator = new Intl.Collator([defaultLocale + extension], {usage: "sort"});
......@@ -18,6 +18,8 @@ extensions.forEach(function (extension) {
var numeric = collator.resolvedOptions().numeric;
if (numeric !== undefined) {
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.");
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment