The diffusion capacity test measures the transfer of gas from air in the lungs to the red blood cells in lung blood vessels.