We can distinguish between cooking oil and butter by bromine water test:
Add bromine water to little of cooking oil and butter taken in different test tubes. Cooking oil decolourises bromine water showing that it is an unsaturated compound while butter doesn't decolourise bromine water showing that it is a saturated compound