if it's indented, don't leave trailing space
phpcs fixes to test templates

And related code changes to make bake match the bake_compare files