message-format-wg icon indicating copy to clipboard operation
message-format-wg copied to clipboard

Message Format - Test Suite

Open romulocintra opened this issue 5 years ago • 3 comments

We should have a group of standard sentences that could be used as a test cases for all possible implementations of message format. They must cover all possible casuistics

We have an example here for selectors.

romulocintra avatar Aug 17 '20 18:08 romulocintra

Unfortunately i cannot assign it to you @grhoten , not sure why. but here is the issue we talked about.👍

romulocintra avatar Aug 17 '20 18:08 romulocintra

As mentioned during the meeting, the test suite for the messageformat npm library is pretty extensive, and relatively portable: https://github.com/messageformat/messageformat/tree/master/test/fixtures

The test fixtures are stored as TS in order to make it easier to generate some of them programmatically and to define a few of the custom formatters, but it'd be pretty straightforward to transform them to a different format. The tests are published under the MIT license, and are therefore pretty free to use.

As the sources for these tests are in MF1, they'll need to be transformed to an MF2 data model either live or as a pre-stage in order to test layers built on top of that.

eemeli avatar Apr 19 '21 21:04 eemeli

Referencig https://github.com/unicode-org/message-format-wg/issues/165#issuecomment-829961122 , cause is a great start to design and plan how test suite should work and is already functional.

My ideia here is to isolate the data source and have a group of generic test value(inputs/expected results), to be reused across different implementations of the MF (something like this independent of the final format) or we can start as we here and choose the format later

romulocintra avatar Apr 30 '21 20:04 romulocintra

Nominating this as a blocker, as the test suite is explicitly listed as one of our deliverables.

eemeli avatar Jan 23 '23 15:01 eemeli