Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
20.59k stars 333 forks source link

Add insta-based snapshot tests that cover side-by-side format #730

Open yuja opened 3 months ago

yuja commented 3 months ago

I'm going to fix inline diff issue #704, and found that the inline format isn't covered by CLI tests. I could duplicate compare_all.sh to test various formats, but it's uneasy to review that a new formatting is better than the previous version. I think snapshot testing will help guarantee the output quality without increasing maintenance burden too much.

If we like the idea, maybe we can migrate some of compare_all.sh tests to the insta-based ones.

Note that this will add ~10sec to "cargo test" runs.