rev-parse test: use test_cmp instead of "test" builtin