A 17-year-old student was injured by a machete attack outside an exam center in Pune, linked to an old rivalry over a girl.