If you need to evaluate the structure, maybe an xslt transform would be a 
good approach.  Or building on that, a schematron test 
(https://schematron.com/document/2760.html?publicationid=).  If you don't 
know about Schematron, it uses XPATH expressions to locate parts of the 
document under test, then tests them for correctness with rules and 
assertions.  Since Leo outlines are XML files, these may be good 
approaches.  BTW, Schematron is an international standard,   ISO/IEC 19757-3 
<https://www.iso.org/obp/ui/#iso:std:iso-iec:19757:-3:ed-3:v1:en>.

On Wednesday, September 8, 2021 at 12:15:03 PM UTC-4 Edward K. Ream wrote:

> On Wed, Sep 8, 2021 at 9:49 AM [email protected] <[email protected]> 
> wrote:
>
> For converting outlines, maybe some fuzzing tests as well?  Most should 
>> fail...
>>
>
> Hehe, I had to google "python fuzzy tests".  Sounds interesting, but I'll 
> leave that for later :-)
>
> *Update re the new tests*
>
> It looks like the new unit tests *are* valid. I compared traces in the 
> setup logic in two cases:
>
> 1. Running the old unit tests (in devel, from unitTest.leo)
> 2. Running the new unit tests (in ekr-unit-test, with the new test-shadow 
> command).
>
> The output looks identical. In particular, sentinel lines are as expected. 
> I must only ensure that the following two structure are identical:
>
> 1. The structure of the children of each @test node in unitTest.leo.
> 2. The structure of *nodes created* by each new unit test.
>
> A test would likely fail if this were not true, but a by-hand check looks 
> advisable.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/cbb08b9a-e45a-4c08-b42c-09cc6f9338a6n%40googlegroups.com.

Reply via email to