make test

Before starting fixing the default namespace problem, I’ve created a test framework and added several tests. The results are as usual.

1) I found an error in my code (well, it’s just a redundant warning, but anyway it should be fixed).
2) I found that an example in the SXML specification looks wrong (TODO: ask in the mailing list).
3) I found that libxml2 rejects such XML: “<doc>]]></doc>” (TODO: figure out if it is right or not).

The testing framework is trivial. Test code is contained in XSLT-files which are applied to themselves. The code is written in such a way that it generates a lot of elements “test” with children “native” and “scheme“. Content of “native” is an XML produced by xsltproc, content of “scheme” is a result of execution of Scheme code with further conversion to XML. The both contents should be exactly the same. This condition is checked by a Python script.

Unfortunately, this approach doesn’t allow testing of handling of error conditions. Maybe I’ll invent something later.

I added several tests which should cover all the SXML structures except namespaces. Testing of namespaces is a task of the next few days.

Leave a Reply