Test script for an answer at StackOverflow.