Repair-R1: Better Test Before Repair