Add tests for Yaml formatting

Add unit tests for Yaml formatting and enable overriding of options.