My standard inspection in junk shops is this...
Check overall appearance, does it look good, scratches , bumps, dents. If it looks shabby its probably not been cared for.
Does it have a skylight filter, if it does it may have been owned by somone careful who will have looked after it.
Does it have end caps, original are best as they are saleable if the lens turns out duff.
Check focus, is it smooth, is the resistance ‘right’ not too hard not too loose.
Close the aperture/iris down and press the stop down lever. Does it fully stop down. Let the lever bo quickly and check if the iris snaps open. Toggle the stop down lever rapidly and see if the iris is responsive.
Check aperture ring, does it click smartly to each f stop. Any missing stops or wobblyness.
Open the iris wide open and take a look inside, take a small beight torch. I have a keychain type thing. Look down the lens from both ends with the tirch at the opposite end and play the torch over the lens. Bits of dust are no biggie but anything larger than a dust mote could be fungus. I would reject any lens with fungus unless I know I can dismantle it easy. Also look for scratches on the lens surface and delamination. De lamination will often show as a kind of foggy effect at the edges lf the lens.
Look down front of lens and point torch down front as well, move the aperture around using the stop down lever, do the blades have any shine on them indicating oil and at various f stops do the blades form a near circle....sometimes a balde can be damaged and you will see a lozenge shape rather than a neat circular shape. Bear in mind they are never really a circle...most apertures look like a polygon but close to circular.
Thats it......if all is ok chances are the lens has no major issues. How much tolerance you can bear on failure of these tests is a judgement on price and whether you think you can fix the lens. Older lenses are often less headache as they were designed quite solidly and can mostly be taken to bits without too much drama. More modern lenses like Minolta MDs and Canon nFDs are near impossible to fix because they are all held together with glue. I havent had to take many Pentax lenses to pices apart froma couple of 50s in the M series and like Minolta MC types they are pretty easy.
Try to avoid zooms, if anything is wrong they are nearly always a nightmare to fix. My own judgement with a zoom is unless its perfect or has very minor problems or is luicrously cheap I would pass up on it. Bagged a scruffy looking Tamron recently that was sold for a tenner on ebay as it was desvribed as dirty. In truth someone had got cleaning fluid under the front element. Easy job to fix and it came with a Minolta MD adaptall in mint which is really what I wnted. The lens was just cherry on the cake.
Oh also forgot...obviously take the skylight off if it has one when you test the lens as it may be damaged rather then the lens itself and some sky
Ights can produce cloudy results under torchlight.
---------- Post added 09-24-19 at 11:44 PM ----------
Oh Nd good luck, do post up if you get a bargain