A good mechanic can tell a lot with eyes and ears--we can do some of it.
--Examine the engine with a flashlight. Look for oil or coolant leaks. Note whether the engine bilge is clean. An old oil-absorber pad underneath is better than a brand new one, since it shows history. The engine should not leak fluids.
--Listen to the engine run. Diesels are noisy, but sound like diesels. Examine the dipstick. Obvious, but every mechanic does it. Neglected boats
often have no oil at all showing on the dipstick.
--Shift gears. You can tell if the cables are shot, or slip, and if the basic linkage works. Transmissions go bad, and during sea trial lots of shifting should be done to confirm reliable operation.
--Exhaust water and smoke. Lots of muffler water should come out. Smoke should not come out at idle--a little steam is common, and should dissipate in five or ten feet. Smoke carries further than that.
--"General condition." Did anybody ever pay attention, change oil, clean the exterior? A filthy mess suggests the opposite.
This is more or less what I gleaned from watching a very experienced old diesel hand inspect my Universal 5432, for which he charged $250. That's about all he did.