Skip to content

Use html-pretty-printer for comparing generated result with expected result. #2

@opensource21

Description

@opensource21

If you write test you must create an expected result exactly (character by character) as it will be generated. Mostly I only want to know if the html-structure is good.
It's much more convenient to write the expected structure with newlines and indention, than writing everything into one single line with blanks in it.
So I would prefer to have the possibility to pretty-print the result and the expected result. This can be done with XMLPretty-Printing or more less accurate with JTidy.
Another approach would be to compare the DOM-Tree directly.
Third solution: Take the expected result and remove all unused Whitespaces.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions