FollowTheProcess / test

A lightweight test helper package 🧪
MIT License
0 stars 0 forks source link

Golden binary compare for testing #44

Open gedw99 opened 1 week ago

gedw99 commented 1 week ago

Is there an existing issue for this?

Description

Can it do golden image or binary compare ?

Anything else?

I often need to check an image is what it should be.

it can probably just compare the file size so you would not need all the image compare imports .

Anyways the package is very useful and covers all the bases . Great work

FollowTheProcess commented 1 week ago

No image comparison specifically. Golden files containing text are supported in test.File and you get a nice pretty line diff. I could imagine a raw bytes version but it would be tricky to make the output easy to understand/debug. The best you could probably do is simply say "the file contents do not match", difficult to show the diff in a binary file

gedw99 commented 6 days ago

Impossible to do a diff / debug on a binary , unless we added some . Not worth it for the bloat.

just knowing that the binary is the same is enough for regression tests. If it does not match then use your own code to do real per binary format compare to help fix the bug :)

I have sample videos, images, pdf files that I commit into git lfs