From 502f5d2d0b2738e0a7c21200974d58a34e2b1c41 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Sun, 5 Apr 2015 18:22:24 +0200 Subject: idcomments: test added Closes #38387. Signed-off-by: Xu Cheng --- Library/Formula/idcomments.rb | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/idcomments.rb b/Library/Formula/idcomments.rb index b7ed08b07..aa686a0b5 100644 --- a/Library/Formula/idcomments.rb +++ b/Library/Formula/idcomments.rb @@ -1,13 +1,22 @@ -require 'formula' - class Idcomments < Formula - homepage 'http://tools.ietf.org/tools/idcomments/' - url 'http://tools.ietf.org/tools/idcomments/idcomments-0.18.tgz' - sha1 'e7e6430926b0c502afcb55a91e90cd84d55c07d4' + homepage "https://tools.ietf.org/tools/idcomments/" + url "https://tools.ietf.org/tools/idcomments/idcomments-0.18.tgz" + sha256 "a75774495e1b9b799326f3c6875db927835546b82762d565efe17e3cbfa6c7b8" + + depends_on "rfcdiff" def install - inreplace 'idcomments', '$(tempfile)', '$(mktemp /tmp/idcomments.XXXXXXXX)' - bin.install 'idcomments' - doc.install %w(about changelog copyright todo) + inreplace "idcomments", "$(tempfile)", "$(mktemp /tmp/idcomments.XXXXXXXX)" + bin.install "idcomments" + doc.install %w[about changelog copyright todo] + end + + test do + (testpath/"draft").write <<-EOS.undent + COMMENT: brew + EOS + + assert_equal "INTRODUCTION, paragraph 0:\n\n\n brew", + shell_output("#{bin}/idcomments draft").strip end end -- cgit v1.2.3