Tests: use test_cmp instead of diff where possible