Re: Test suite results

Norm Tovey-Walsh <norm@saxonica.com> writes:
> [[PGP Signed Part:Undecided]]
>> There is no mechanism in ixml to allow any grammar + input pair to
>> produce any output outside the outermost element of the output.  So a
>> QT-based evaluator should start its comparison with the element, not
>> with the document node, and evaluators built with other tools should
>> analogously ignore the leading newline you will find in many of the
>> *.output.xml files.

Mea culpa. Because the “toString()” representation of my node object
pretty prints the output, I misdiagnosed the problem. I’d already worked
out that content before and after the document element was out-of-scope.

No, the real problem is that the test suite says the result should be:

<data>
   <range1>5</range1>
   <range2> </range2>
</data>

when the grammar produces:

<data><range1>5</range1><range2> </range2></data>

I’d ask if we are just supposed to ignore whitespace, but this test
*requires* that I get the tab in the right place, so I don’t think
that’s reasonable.

Looking at other tests, I see many have been reformated so that the
pretty printing puts whitespace in irrelevant places, but this one
perhaps has been overlooked. I think the correct solution here is to
reformat the expected result:

<data
  ><range1>5</range1
  ><range2> </range2
></data>

I’d like to make a pull request for that change, but we need to settle
the question of where and how the test suite is maintained first :-(

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Wednesday, 2 February 2022 08:18:58 UTC