Closed tajmone closed 1 year ago
The underlying bug is that HTML attributes (html_xxx
) for media nodes (image, audio, video) are ignored in the HTML renderer.
The bug is now fixed in the develop
branch, and the fix will be included in the next public version.
Thanks for reporting this bug.
Since the PML syntax is quite complex in terms of all the possible combinations of nodes and attributes, types of attributes values, as well node contexts, it's going to be very hard to be able to manually cover all possible test conditions (both valid and invalid, to test successes and proper error handling).
Probably the best solution would be to rely on fuzz testing instead.
I believe there are various Java libraries for fuzz testing, either native or ported (e.g. JQF). Although it would require investing energy on its initial setup, I believe it's worth the costs since it will therefrom grant solid test coverage for all the various combinations between nodes, and between nodes and their attributes.
If I've understood correctly, most fuzzing libraries require you define a rule-based driver, via some sort of grammar describing a template for the possible combinations in the generated input sources fed to to test unit.
With syntaxes like PML, it's just too hard to manually cover all edge cases testing, and bugs tend to get by unnoticed for a long time.
Interesting idea! Thanks for the links. I'll have a look at them.
Fixed in version 4.0.0
I noticed that with PMLC 3.1.0 I'm failing to render HTML Attributes for images
alt
ortitle
text:both statements will just produce the following HTML snippet:
As far as I can remember, both used to work fine in my previous tests with PML 2.x, and the
html_alt
is even mentioned in the PML User Manual examples.I haven't had a chance to test whether this is affecting just images or other elements too, but it definitely looks like a bug that crept in with the latest updates (either 3.0 or 3.1.0).