tests: Add automatized test for sha256

Intended as an example for #816. I guess I could have found an easier starting point … Anyways, it works.