Tidy tests.

Format tests constistantly and strip end of line spaces.