A body being repelled by charged body (could be positive or negative) indicates that the former body was charged whereas a body attracted by a charged body (could be positive or negative) does not necessarily prove that the former body is charged.
A charged body can induce charges of the opposite sign in an uncharged body. As this induced charge is of the opposite sign that of the originally charged body, they will attract each other.
If the test body was already oppositely charged to that of the tester charge, then they will attract each other.
Therefore, attraction is not a sure test for the presence of charge.
An uncharged body can in now way be repelled by a charged body. It can only be attracted due to induction of opposite charges on the charged body.
However, if the test body is charged, it will be repelled by a tester charge of the same sign.
Therefore, repulsion is a sure test for the presence of charge.