keyman icon indicating copy to clipboard operation
keyman copied to clipboard

feat(developer): emit ldml test case as markdown 🙀

Open srl295 opened this issue 1 year ago • 2 comments

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

  1. copy this string: 𐓏
  2. press 8
  3. 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

srl295 avatar Feb 22 '24 17:02 srl295

see https://github.com/keyman-keyboards/ldml_test/pull/1 for a manually generated README

srl295 avatar Feb 23 '24 23:02 srl295

Moving to A18S19, blocked by #5016

darcywong00 avatar Aug 06 '24 03:08 darcywong00