There are 3 separate tests....
A lighted splint in a test tube of hydrogen will give a squeaky pop sound when it ignites
Oxygen in a test tube will re-light a glowing splint.
Carbon dioxide will extinguish a lighted splint. However, a more conclusive test is to pass it through limewater (Calcium Hydroxide solution ) which will turn milky