pentagastrin test, a test of gastric function comparing basal acid output with a peak acid output. After the patient fasts overnight, a basal acid output and its pH are obtained for secretion of stomach acid. Then pentagastrin is administered into the stomach through a nasogastric tube and maximal acid output and peak acid output values are obtained. Also called pentagastrin stimulation test.