make directive tests more portable