From fcf837e1d6223f551c725316835a994001aa69d1 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 6 Jan 2015 20:45:03 +0100 Subject: 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 --- Library/Formula/diction.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3