These are real blockchain transactions examples of computing sighash for P2WKH, P2MS, P2SH multisig and P2WSH multisigs.
For M of N multisigs, the tests verify that M from the N keys from the ScriptPubKey do correspond to the M input's signatures, given the sighash computation. The sighash computation is inspired by Andrew Poelstra's comment.
It is currently lacking P2TR examples.
To run all examples use:
cargo run --example sighash