svg2pdf: test added

Closes Homebrew/homebrew#38289.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Baptiste Fontaine 2015-04-02 01:17:23 +02:00 committed by Mike McQuaid
parent c665865f44
commit 5591a6a22f

View file

@ -1,17 +1,28 @@
require 'formula'
class Svg2pdf < Formula
homepage 'http://cairographics.org/'
url 'http://cairographics.org/snapshots/svg2pdf-0.1.3.tar.gz'
sha1 '07c5e8b95b43bcdd40d791ccb1a2cb5221093f19'
homepage "http://cairographics.org/"
url "http://cairographics.org/snapshots/svg2pdf-0.1.3.tar.gz"
sha256 "854a870722a9d7f6262881e304a0b5e08a1c61cecb16c23a8a2f42f2b6a9406b"
depends_on 'pkg-config' => :build
depends_on 'libsvg-cairo'
depends_on "pkg-config" => :build
depends_on "libsvg-cairo"
resource("svg.svg") do
url "https://raw.githubusercontent.com/mathiasbynens/small/master/svg.svg"
sha256 "900fbe934249ad120004bd24adf66aad8817d89586273c0cc50e187bddebb601"
end
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
system "make install"
system "make", "install"
end
test do
resource("svg.svg").stage do
system "#{bin}/svg2pdf", "svg.svg", "test.pdf"
assert File.exist? "test.pdf"
end
end
end