Comment 17 for bug 174720

Revision history for this message
bbyak (buliabyak) wrote : Re: [Bug 174720] Re: currentColor in style= is misinterpreted

On Tue, Apr 8, 2008 at 7:56 AM, Martin von Gagern
<email address hidden> wrote:
> By the way, does the inkscape development team do any kind of automatic testing, or plan to do so?

Finally, long overdue, but yes, we plan. It's one of the gsoc projects
this year, by Jasper van de Gronde. You can join the discussion on the
devel list and help out with this.

> The most recent issues might have been detected by some automatic test that, given a number of possible style descriptions, reads each style to inkscape data structures, writes it back to style, reads it again, and compares the both representations to ensure it can read what it wrote.

We do have a small test suite for styles in style-test.cpp, but
apparently it does not test currentColor enough (understandably, since
Inkscape never uses currentColor itself)

> Another interesting way to avoid these issues might be some more
> extensive verification. An invalid style attribute like the one above
> certainly should never have been generated by inkscape itself. If you
> were to implement appropriate error checking code in sp_style_read_*,
> you could enable it while processing internally generated attributes.
> You might wish to disable it for file reading or attributes entered in
> the XML editor, or even better, you might wish to handle errors there
> differently. So perhaps you want a format error listener interface, and
> pass instance of that along. Quite a bit of work, but maybe worthwhile,
> as it would also help identify SVG documents in the wild that aren't
> fully understood by inkscape.

I don't think we want to overburden Inkscape itself with checks over
and above those prescribed by the SVG/CSS standard. But an external
consistency checker for Inkscape-produced files might be a great
addition to the testing project.