|
1 |
| -The tests in the `./tests/` directory were originally copied from the [messageformat project](https://github.com/messageformat/messageformat/tree/11c95dab2b25db8454e49ff4daadb817e1d5b770/packages/mf2-messageformat/src/__fixtures) |
2 |
| -and are here relicensed by their original author (Eemeli Aro) under the Unicode License. |
| 1 | +# Unicode MessageFormat Test Suite |
3 | 2 |
|
4 |
| -These test files are intended to be useful for testing multiple different message processors in different ways: |
| 3 | +These test files are intended to be useful for testing multiple different _message_ processors in different ways: |
5 | 4 |
|
6 | 5 | - `syntax.json` — Test cases that do not depend on any registry definitions.
|
7 | 6 |
|
8 | 7 | - `syntax-errors.json` — Strings that should produce a Syntax Error when parsed.
|
9 | 8 |
|
| 9 | +> [!NOTE] |
| 10 | +> Tests for the disallowed uses of unpaired surrogate code points are not included |
| 11 | +> because JSON does not permit unpaired surrogate code points. |
| 12 | +> If your implementation uses UTF-16 based strings (such as JavaScript `String` or Java `java.lang.String`) |
| 13 | +> or otherwise allows unpaired surrogates in text or literals, you will need to implement tests equivalent |
| 14 | +> to the following for syntax errors: |
| 15 | +> ```json |
| 16 | +> { |
| 17 | +> "locale": "en-US", |
| 18 | +> "src": "{\ud800}", |
| 19 | +> "expErrors": [{ "type": "syntax-error" }] |
| 20 | +> } |
| 21 | +> ``` |
| 22 | +
|
10 | 23 | - `data-model-errors.json` - Strings that should produce a Data Model Error when processed.
|
11 | 24 | Error names are defined in ["MessageFormat 2.0 Errors"](../spec/errors.md) in the spec.
|
12 | 25 |
|
@@ -192,3 +205,8 @@ except that it cannot be used for selection.
|
192 | 205 |
|
193 | 206 | When `:test:format` is used as a _selector_,
|
194 | 207 | the steps under 2.iii. of [Resolve Selectors](/spec/formatting.md#resolve-selectors) are followed.
|
| 208 | +
|
| 209 | +## About |
| 210 | +
|
| 211 | +The tests in the `./tests/` directory were originally copied from the [messageformat project](https://github.com/messageformat/messageformat/tree/11c95dab2b25db8454e49ff4daadb817e1d5b770/packages/mf2-messageformat/src/__fixtures) |
| 212 | +and are here relicensed by their original author (Eemeli Aro) under the Unicode License. |
0 commit comments