No risk. Only the head needs protection.
A test would be a waste of time.
HIV is instantly inactivated in air which means it is effectively dead so it can't infect from touching HIV where you shaved. It doesn't matter if you and they were bleeding at the time either because it is effectively dead.
Only adult risks are unprotected penetrating vaginal or anal sex or sharing needles that you inject with but you didn't do that.
Even with blood, lactation cuts, rashes, burns etc air does not allow inactivated virus to infect from touching HIV. The above HIV science is 40 years old and very well established so nothing you can add will make it a risk.