Based on https://github.com/rust-analyzer/expect-test