It is tested by photographing patterns of fine lines and finding the finest still separated. Datasheets usually give two figures: at high contrast (1000:1) and at low contrast (1.6:1). The high-contrast number is the one most often quoted.
Slow, fine-grained films resolve the most. Rollei gives RPX 25 up to 260 lp/mm; typical ISO 400 films are far lower. In practice your lens, focus and camera shake limit sharpness long before the film does.