Correct calculation of :test option