css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
39 stars 2 forks source link

Add images from canvg's test suite #92

Closed murkle closed 2 months ago

murkle commented 9 months ago

I don't know if you've seen these, but it's a very good SVG test suite: https://github.com/canvg/canvg/tree/master/test/svgs

carlosame commented 9 months ago

Thanks for the suggestion, those tests could be put into samples/canvg.

The idea would be to add the LICENSE at the top of each file (and add something to NOTICE), add each entry to SamplesRenderingTest, run that test and then the reference images would be put into test-references/canvg (that directory should be created first).

The file IMAGE_COMPARISONS.md gives more information about how the image comparison tests work.

I don't think that I'll be able to do that anytime soon, although if in the meantime you are willing to send a PR, feel free to do so.

carlosame commented 2 months ago

I expect that this weekend there will be news about this issue.

carlosame commented 2 months ago

The pull request that I opened adds 201 tests, of which 16 are disabled, to the test suite. Once it is merged, EchoSVG will have 1050 tests. Of those tests, only those that do not involve the SecurityManager can be run during the Gradle build, leaving 1040 tests (29 of them disabled).

Anyone interested in the differences between EchoSVG tests and Batik's test suite should read From Batik test suite to EchoSVG tests.

carlosame commented 2 months ago

For the record, after today's commits only 10 Canvg tests remain disabled, 5 of them shall remain that way because they load remote resources. EchoSVG already tests the loading of certain remote resources that are controlled by this project, and sandboxed by a Security Manager.