Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

dfmt 0.4.1 #45242

Closed
wants to merge 1 commit into from
Closed

dfmt 0.4.1 #45242

wants to merge 1 commit into from

Conversation

John-Colvin
Copy link
Contributor

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.

@MikeMcQuaid
Copy link
Member

Looks good to me 👍

@John-Colvin
Copy link
Contributor Author

The tester appears to have had a hiccough...

@MikeMcQuaid
Copy link
Member

@BrewTestBot test this please


system "#{bin}/dfmt", "-i", "test.d"

diff "test.d", "test_expected.d"
Copy link
Member

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?

Copy link
Contributor Author

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.

@John-Colvin John-Colvin force-pushed the patch-30 branch 2 times, most recently from 57d0b44 to 1836d92 Compare October 22, 2015 15:34

system "#{bin}/dfmt", "-i", "test.d"

system "diff", "test.d", "test_expected.d"
Copy link
Contributor

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.

@bfontaine
Copy link
Contributor

Thank you for your contribution to Homebrew @John-Colvin; we appreciate it! 🎉

@bfontaine bfontaine closed this in defdf2f Oct 23, 2015
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants