diff options
| author | Alexis Hildebrandt | 2015-01-06 20:45:03 +0100 |
|---|---|---|
| committer | Jack Nagel | 2015-01-12 21:08:32 -0500 |
| commit | fcf837e1d6223f551c725316835a994001aa69d1 (patch) | |
| tree | cbb25fb1990bb0b623e966e789bccc3a512190e7 /Library/Formula/diction.rb | |
| parent | 94258e0e6e790ea172ac3d004d65c1a98a1758d2 (diff) | |
| download | homebrew-fcf837e1d6223f551c725316835a994001aa69d1.tar.bz2 | |
diction: modernize
* Remove obsolete require 'formula'
* Replace single quotes with double quotes
* Split system argument string
* Add test
Closes #35615.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/diction.rb')
| -rw-r--r-- | Library/Formula/diction.rb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Library/Formula/diction.rb b/Library/Formula/diction.rb index b28d86fe1..22e1cbfc9 100644 --- a/Library/Formula/diction.rb +++ b/Library/Formula/diction.rb @@ -1,14 +1,19 @@ -require 'formula' - class Diction < Formula - homepage 'http://www.gnu.org/software/diction/' - url 'http://ftpmirror.gnu.org/diction/diction-1.11.tar.gz' - mirror 'http://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz' - sha1 '30c7c778959120d30fa67be9261d41de894f498b' + homepage "https://www.gnu.org/software/diction/" + url "http://ftpmirror.gnu.org/diction/diction-1.11.tar.gz" + mirror "https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz" + sha1 "30c7c778959120d30fa67be9261d41de894f498b" def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make install" + system "make", "install" + end + + test do + file = "test.txt" + (testpath/file).write "The quick brown fox jumps over the lazy dog." + assert_match /^.*35 characters.*9 words.*$/m, shell_output("#{bin}/style #{file}") + assert_match /No phrases in 1 sentence found./, shell_output("#{bin}/diction #{file}") end end |
