Closed mlange-42 closed 1 year ago
nice!
can you add test file that was breaking for you?
ideally with all the 5 characters there were breaking
we need this for integration test
Not sure how to test this. treemap
worked fine, just the browser or whatever you use to display the SVG complains about/crashes with illegal characters or XML syntax error.
to test this just need to have /testdata/ok_strange_chars_path.csv
that contains those chars. then we build and try to render those. then manual verification and include into repo.
we can't really "automate" (actually can but it is overkill for this project) whether SVG looks ok. so manual verification
Added a test file that uses all the critical characters.
Tests showed that setting LazyQuotes
in the CSV reader was additionally required to allow double quotes.
Base: 52.83% // Head: 52.39% // Decreases project coverage by -0.43%
:warning:
Coverage data is based on head (
c9a43ad
) compared to base (e5ec8a1
). Patch coverage: 50.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Escapes illegal XML characters.
Decided to do it in
svg.go
rather than in theUIText
construction, as the issue is specific for SVG rendering.Not sure how to add useful unit tests for this.
Fixes #20