prune trailing whitespace in test code