diff options
| author | Mike Naberezny | 2014-02-05 12:13:46 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-05 23:03:09 -0800 |
| commit | 666c2a526104047b751356aafc4efc646b558b68 (patch) | |
| tree | 3783633ceb1381d2d04bf8afa1270f85e191d7a3 | |
| parent | 63451e4f419ef3ba1ef4a2a4459591575f53ed5b (diff) | |
| download | homebrew-666c2a526104047b751356aafc4efc646b558b68.tar.bz2 | |
html2text: add test
Closes #26439.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/html2text.rb | 15 |
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 |
