Test with test.check

Two errors fixed:
negative PNR could be generated
PNR shorter than 6 digits