aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/graphviz.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2011-09-01 12:04:27 -0700
committerAdam Vandenberg2011-09-01 12:04:27 -0700
commitc45f08304306559f8b2b1f04f22fa35ad62852f1 (patch)
treea5a8f753a5dcb7b668fd66b51600c25b12d18f5e /Library/Formula/graphviz.rb
parent03a4e291cc40e1868cc8d29d0145cd26a0fc4076 (diff)
downloadhomebrew-c45f08304306559f8b2b1f04f22fa35ad62852f1.tar.bz2
Graphviz: add test
Diffstat (limited to 'Library/Formula/graphviz.rb')
-rw-r--r--Library/Formula/graphviz.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb
index b9def84ea..5a8557b28 100644
--- a/Library/Formula/graphviz.rb
+++ b/Library/Formula/graphviz.rb
@@ -34,4 +34,17 @@ class Graphviz < Formula
"--disable-swig"
system "make install"
end
+
+ def test
+ mktemp do
+ p = Pathname.new Dir.pwd
+ (p+'sample.dot').write <<-EOS.undent
+ digraph G {
+ a -> b
+ }
+ EOS
+
+ system "#{bin}/dot -Tpdf -o sample.pdf sample.dot && /usr/bin/open ./sample.pdf && /bin/sleep 3"
+ end
+ end
end