Smear on a cave wall, "The paste quickly dries and cracks" - it's a cave-in tile. "The paste slowly trickles down." - it's safe to mine.
Smear on a cave floor, "No/1/2/3/4/5/6/7/8 bubbles appear in the paste." - there's that many cave-in tiles adjacent.