aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXu Cheng2014-12-29 15:17:55 +0800
committerMike McQuaid2014-12-29 07:48:51 +0000
commitc06f133915da2fb74ab2b8053cffcaa550e103f9 (patch)
tree2a0f693ed536b36365c4f3ed007d41072c871fb3 /Library/Formula
parent737fba39e878ad75fa0ff48c94e0847236c072b4 (diff)
downloadhomebrew-c06f133915da2fb74ab2b8053cffcaa550e103f9.tar.bz2
asciidoc: add test
Closes #35331. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/asciidoc.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Formula/asciidoc.rb b/Library/Formula/asciidoc.rb
index 36720fe66..78a15333c 100644
--- a/Library/Formula/asciidoc.rb
+++ b/Library/Formula/asciidoc.rb
@@ -40,4 +40,10 @@ class Asciidoc < Formula
See `man 1 xmllint' for more.
EOS
end
+
+ test do
+ (testpath/"test.txt").write("== Hello World!")
+ system "#{bin}/asciidoc", "-b", "html5", "-o", "test.html", "test.txt"
+ assert_match /\<h2 id="_hello_world"\>Hello World!\<\/h2\>/, File.read("test.html")
+ end
end