mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 19:25:49 +00:00
This updates the MF2 spec tests to 943479b602
with the following exceptions:
- functions/currency.json and functions/math.json are omitted because these are not yet implemented
- bidi.json will be handled in a future PR
- u-options.json will be handled in a future PR
Changes include:
* `:integer` now returns a value encapsulating the rounded numeric value of the argument, rather than
the value itself.
* Fallbacks are handled according to the current spec.
* Fallback values are not passed into functions.
* Characters inside literal fallbacks are properly escaped.
* The test runner skips null values properly.
* The test runner handles boolean `expErrors` in defaultTestProperties.
* `:string` normalizes its input and normalizeNFC() has been refactored so it can be called there.
45 lines
983 B
JSON
45 lines
983 B
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
|
|
"scenario": "Date function",
|
|
"description": "The built-in formatter for dates.",
|
|
"defaultTestProperties": {
|
|
"bidiIsolation": "none",
|
|
"locale": "en-US",
|
|
"expErrors": false
|
|
},
|
|
"tests": [
|
|
{
|
|
"src": "{:date}",
|
|
"exp": "{:date}",
|
|
"expErrors": [
|
|
{
|
|
"type": "bad-operand"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"src": "{horse :date}",
|
|
"exp": "{|horse|}",
|
|
"expErrors": [
|
|
{
|
|
"type": "bad-operand"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"src": "{|2006-01-02| :date}"
|
|
},
|
|
{
|
|
"src": "{|2006-01-02T15:04:06| :date}"
|
|
},
|
|
{
|
|
"src": "{|2006-01-02| :date style=long}"
|
|
},
|
|
{
|
|
"src": ".local $d = {|2006-01-02| :date style=long} {{{$d}}}"
|
|
},
|
|
{
|
|
"src": ".local $d = {|2006-01-02| :datetime dateStyle=long timeStyle=long} {{{$d :date}}}"
|
|
}
|
|
]
|
|
}
|