Colonial-Dev / inkjet

A batteries-included syntax highlighting library for Rust, based on tree-sitter.
https://docs.rs/inkjet
Apache License 2.0
51 stars 2 forks source link

Create snippet integration tests for all languages #12

Open Colonial-Dev opened 7 months ago

Colonial-Dev commented 7 months ago

What it says on the tin. For all supported languages, highlight a snippet to HTML and manually verify that highlighting is working as expected.

leandrocp commented 1 month ago

Hey @Colonial-Dev do you have some idea how to implement this? Can I help somehow?

Colonial-Dev commented 1 month ago

I had a local branch with some basic work done. The general idea was to collect examples for each supported language, then write an integration test (or something) that fed each example through an HTML highlighter and into one mega-file so the output could be easily verified by eye.

It kinda fell by the wayside due to academic commitments :sweat_smile: Thanks for reminding me!

If you'd still like to help - I can do the grunt work of gathering all the samples. If you could implement the highlight_all_snippets function in tests/snippets.rs, that would be a huge help! It should be on the sample_testing branch that I just published.

(I think the debug formatting of the enum should be sufficient for the file name.)