asciidoc: add test

Closes Homebrew/homebrew#35331.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xu Cheng 2014-12-29 15:17:55 +08:00 committed by Mike McQuaid
parent 7f081e2750
commit c4eb17a40d

View file

@ -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