Because when we bring a charged body near an uncharged body, an opposite charge is induced on the neutral body. And their will an attraction between them. But the given body is uncharged. So, we cannot say that a body is charged just on the basis of attraction. Only 2 charged bodies can possibly repel each other (when brought together against same pole)
Therefore, repulsion is a sure test of charge.