India close in on Test win over S Africa