test: Add tests for fmt config options. #230
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds tests for the configurable formatter. Each configuration option is tested individually, as they each should be independent of each other. If we have a need to test multiple configuration options simultaneously in the future this setup should be able to do it easily.
While here I also found a bug in how tab stops were treated by the formatter when removing trailing whitespaces. After indentation was performed the step to remove trailing whitespace was not properly checking for the inserted tab characters.
There was also another bug with handling the emptyline before the section header which I fixed.
Also, fix a bug in the docs where the
meta.align_values
andmeta.align_patterns
options were incorrectly set. They changed to true in a previous commit but I did not update the docs then.