from the way you describe it, to me at least , it sounds like you were penetrated, regardless of how little (please let me know if I'm misunderstanding what you said, the 1/4 makes me thing penetration) . if you were at any risk, a one time sexual encounter is low, even with a confirmed HIV positive partner, and your encounter would be very low, but not zero. its hard to transmit HIV though .If the was no penetration at all though, no risk, no need to test.
You say he didn't penetrate, so that means you are safe. so you had no risk. An HIV test would be a waste of time.
HIV is instantly inactivated in air and also in saliva which means it is effectively dead so it can't infect from touching, external rubbing or oral activities. It doesn't matter if you and they were actively bleeding or had cuts at the time either because the HIV is effectively dead.
Only 3 adult risks are the following:
1. unprotected penetrating vaginal with a penis
2. unprotected penetrating anal sex with a penis
3. sharing needles that you inject with. Knowing these 3 are all you need to know to protect yourself against HIV. The situation you describe is a long way from any of these 3.
Even with blood, lactation, cuts, rashes, burns, etc the air or the saliva does not allow inactivated virus to infect from touching, external rubbing or oral activities. Doctors have calculated the risk from what you describe to be less than that of being hit by a meteor, therefore no one will get HIV from what you did in the next 40 years of your life either. The above HIV science is 40 years old and very well established, so no detail that you can add to your encounter will change it from zero risk.