aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/html2text.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Formula/html2text.rb b/Library/Formula/html2text.rb
index 1d1d19ae9..5b9239e2f 100644
--- a/Library/Formula/html2text.rb
+++ b/Library/Formula/html2text.rb
@@ -23,4 +23,19 @@ class Html2text < Formula
man1.install "html2text.1.gz"
man5.install "html2textrc.5.gz"
end
+
+ test do
+ path = testpath/"index.html"
+ path.write <<-EOS.undent
+ <!DOCTYPE html>
+ <html>
+ <head><title>Home</title></head>
+ <body><p>Hello World</p></body>
+ </html>
+ EOS
+
+ output = `#{bin}/html2text #{path}`.strip
+ assert_equal "Hello World", output
+ assert_equal 0, $?.exitstatus
+ end
end