Conversation
Looks good to me 👍 |
The tester appears to have had a hiccough... |
@BrewTestBot test this please |
|
||
system "#{bin}/dfmt", "-i", "test.d" | ||
|
||
diff "test.d", "test_expected.d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this line, out of interest? Just wondering since we're not checking for anything here, and diff
as a command isn't likely to ever fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had assumed that the result of diff would be checked. Fixed now.
57d0b44
to
1836d92
Compare
|
||
system "#{bin}/dfmt", "-i", "test.d" | ||
|
||
system "diff", "test.d", "test_expected.d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of writing an expected result then diff
-ing it you can put it in a variable (e.g. test_expected
) then use assert_equal test_expected, (testpath/"test.d).read
.
Thank you for your contribution to Homebrew @John-Colvin; we appreciate it! 🎉 |
dfmt is a tool for formatting D source code. It's well maintained and in the long term is likely to become part of the main DMD distribution (At some point I will split all the constituent parts of
dmd.rb
out into separate packages, so don't worry, this formula won't become obsolete).No, there isn't a
make install
.