[liblouis-liblouisxml] Re: hyphenation testing in the runHarnessV2.py script

  • From: Hammer Attila <hammera@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 06 Jun 2012 11:35:16 +0200

Hy Christian,

Not every time I would like doing both three test.
Now the harness files happening following operations:
If a test case not declared with the testmode entry, runHarnessV2.py script doing only a translate test, and comparing the brl field stored braille result and louis.translate function produced braille result, similar with runHarness.py old script. Of course mode, brlCursorPos, and cursorPos entryes possible using with forward tests. If declared a test case the testmode entry, and the entry value is translate, happening the translate test too. If the test mode entry is backtranslate, happening the backtranslate test the actual test case only.

Look two example, based with Michael determined first specification when migrating with json:
{
    "table": "hu1.ctb",
    "tests": [
        {
            "brl": "ad\"s5er}",
            "txt": "adásszerű"
        },
        {
            "brl": "ad\"s5er}",
            "testmode": "backtranslate",
            "txt": "adásszerű"
        },
    ]
}

If need changing the json test harness file structure, I absolute agree, but better doing I think this change the next developing cicle if very near the stable release publicating date.
What the final date?
Your suggested format is clear readable, because if I understanding right your suggestion, first declared all forward tests, second declared all backward tests, and future the third block declared all hyphenation tests.
This format is cleaner.

Possible I wrote wrong last part my letter.
If the new stable release now we not want supporting hyphenation tests, simple need modifying the doc/liblouis.texi file.
Original part with committed:
"@item testmode
The optional testmode field can have three values: "translate" (default if undeclaired), "backtranslate" or "hyphenate".
Declares what tests should be performed on the test data."
Modified part if we not ready hyphenation test mode before stable release date:
""@item testmode
The optional testmode field can have two values: "translate" (default if undeclaired), "backtranslate".
Declares what tests should be performed on the test data."

Attila
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: