keyman
keyman copied to clipboard
feat(developer): emit ldml test case as markdown 🙀
Given LDML test format:
<test name="key-8">
<startContext to="ABC" />
<keystroke key="8" />
<check result="8:ctxt:OK" />
</test>
<test name="key-8-fail">
<startContext to="" /> <!-- w/o context -->
<keystroke key="8" />
<check result="8:ctxt:FAIL"/>
</test>
<test name="key-8-osage">
<startContext to="𐓏" />
<keystroke key="8" />
<check result="8:ctxt:OK" />
</test>
... we could have a tool convert this into markdown so users can run the test manually, something like:
Test: key-8
press 8 Check that the result is 8:ctxt:OK
Test: key-8-osage
- copy this string:
𐓏- press 8
- Check that the result is 8:ctxt:ok
This could be used to (for example) maintain a TESTING.md automatically in the https://github.com/keyman-keyboards/ldml_test repo, generated from the unit test xml.
related to #10192 and #10505
see https://github.com/keyman-keyboards/ldml_test/pull/1 for a manually generated README
Moving to A18S19, blocked by #5016