Fix indentation test #971

Merged
prologic merged 1 commits from lyse/yarn:main into main 1 month ago
lyse commented 1 month ago
Owner

The test file had a plural _tests suffix, so it was actually not
detected as a test file. Renaming it to a singular _test suffix
revealed that the test actually failed.

It's not entirely obvious to me whether the test or the implementation
was wrong. But just a newline at the end should not hurt. In fact, it's
always good to end text files with a final newline. There are old tools
out there which ignore the last line if it does not end with a newline.
So I decided to fix the test and leave the implementation alone. To
cement that final newline behavior I added a test for a single line.

The test file had a plural `_tests` suffix, so it was actually not detected as a test file. Renaming it to a singular `_test` suffix revealed that the test actually failed. It's not entirely obvious to me whether the test or the implementation was wrong. But just a newline at the end should not hurt. In fact, it's always good to end text files with a final newline. There are old tools out there which ignore the last line if it does not end with a newline. So I decided to fix the test and leave the implementation alone. To cement that final newline behavior I added a test for a single line.
lyse added 1 commit 1 month ago
fd9edec70f Fix indentation test
lyse requested review from prologic 1 month ago
prologic approved these changes 1 month ago
prologic merged commit fd9edec70f into main 1 month ago

Reviewers

prologic approved these changes 1 month ago
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
The pull request has been merged as fd9edec70f.
Sign in to join this conversation.
Loading…
There is no content yet.