Test removal of default locale fallback in Intl.Locale.p.getCollations - #5093
Merged
ptomato merged 4 commits intoJul 24, 2026
Merged
Conversation
gibson042
force-pushed
the
ecma402-1072-collation-no-default-locale-fallback
branch
from
July 23, 2026 19:19
660dd6c to
1f7eb65
Compare
This commit provides additional coverage for the CollationsOfLocale AO, in preparation for the normative change in tc39/ecma402#1072. LLM disclosure: I used a bot to draft these tests, and hand-edited them until I was satisfied. default-locale-fallback.js is heavily commented, but I did actually remove all the LLM comment spew; what's left are my own comments.
With normative PR tc39/ecma402#1072, the unmatched locales (e.g. qfz, qga-DE, etc.) are hardcoded to return the root collations ["emoji", "eor"] from getCollations(). The und locales are no longer hardcoded, but it's a safe assumption that they will also return the root collations. Combine the two tests that dealt with und and unmatched locales into one.
gibson042
force-pushed
the
ecma402-1072-collation-no-default-locale-fallback
branch
from
July 23, 2026 19:24
1f7eb65 to
b93b34a
Compare
gibson042
force-pushed
the
ecma402-1072-collation-no-default-locale-fallback
branch
from
July 23, 2026 19:28
b93b34a to
3cb8424
Compare
ptomato
approved these changes
Jul 24, 2026
ptomato
left a comment
Member
There was a problem hiding this comment.
Rubber-stamp (I actually opened this PR originally and Richard reviewed it)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #5092, which I accidentally closed.
This PR adds baseline tests for the return value of Intl.Locale.p.getCollations() reflecting the situation before normative PR tc39/ecma402#1072 in the first commit, and in the second commit makes the necessary changes for the normative PR.
Note that because the default locale is out-of-band,
und-locale.jsmight pass or fail if the normative change is not implemented, depending on what the environment's default locale is. It should always pass regardless of the environment's default locale if the normative change is implemented correctly. Try running it withLC_ALL=dein the environment, for example.