[liblouis-liblouisxml] Re: proposal for a test harness

  • From: Christian Egli <christian.egli@xxxxxx>
  • To: Mesar Hameed <mesar.hameed@xxxxxxxxx>
  • Date: Mon, 27 Feb 2012 10:32:25 +0100

Hi Mesar

Mesar Hameed <mesar.hameed@xxxxxxxxx> writes:

> Yes, attached, not sure if it is as flexible as we want it to be, but it did 
> the job for me.

I looked at your test harness and it looks very interesting. It is very
similar in spirit to what I tried to do with corpus based tests[1]. The
corpus based tests let you specify a file where each line is a test
case. The first column is the expected input and the second column is
the expected output. There is a test in svn and it is run when you type
make check. However the test is very basic and nobody seems to have
picked up on it or ever used it. Have a look at the README in
tests/table_test_corpuses.

Two points about your test harness:

1. Implemented in Python: Don't get me wrong, I like Python. But
   implementing the test harness in Python means that a user needs to
   have it installed and also needs to have the Python bindings
   installed before she can run the tests.

2. Doesn't run locally: As I said above you need to install the Python
   bindings first before you can run the tests.

We can decide that these are no big problems and a user can be expected
to install Python and the Python bindings before running the test
harness. On the other hand the corpus based tests are implemented in
Perl and use the standard lou_translate, i.e. no need to install Python
and they can be run from within the liblouis src directory without any
installation. I think I could easily extend the Perl script to cover
your use case (just split the line on tabs instead on any white space).
Let me translate your example into a (what I called) corpus based test
and we could then possibly merge the two efforts.

Thanks
Christian

Footnotes: 
[1]  
http://code.google.com/p/liblouis/source/browse/#svn%2Ftrunk%2Ftests%2Ftable_test_corpuses
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

-----
Jetzt kostenlos eidgenoessische und kantonale Abstimmungsunterlagen aus 17 
Kantonen
zum Hoeren auf CD abonnieren: medienverlag@xxxxxx
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: