Added tests for whitespace parsing

Pulled from master.