unicode-org / message-format-wg

Developing a standard for localizable message strings
Other
229 stars 33 forks source link

Add :test:function, :test:select, and :test:format function definitions #769

Closed eemeli closed 4 months ago

eemeli commented 5 months ago

CC @mradbourne

Given that we shouldn't rely on :number and :datetime producing exact results but we still want to ensure that our interfaces with them work, let's add :test:number and :test:plural as well-defined functions intended for tests only, with exactly defined behaviour.

This PR could be extended with test cases making use of these, but I figured it'd be more useful to consider the general case first, esp. in order to avoid conflicting with #767.

eemeli commented 5 months ago

As discussed during yesterday's call, it'd be better for the functions to more clearly depart from e.g. :number.

I also added details for what happens when a test:func value is used as an argument of another test:func expression.