aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libtiff.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/libtiff.rb b/Library/Formula/libtiff.rb
index 665171447..bbd9fc506 100644
--- a/Library/Formula/libtiff.rb
+++ b/Library/Formula/libtiff.rb
@@ -29,4 +29,21 @@ class Libtiff < Formula
"--with-jpeg-lib-dir=#{jpeg}/lib"
system "make", "install"
end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <tiffio.h>
+
+ int main(int argc, char* argv[])
+ {
+ TIFF *out = TIFFOpen(argv[1], "w");
+ TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) 10);
+ TIFFClose(out);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "test.c", "-ltiff", "-o", "test"
+ system "./test", "test.tif"
+ assert_match /ImageWidth.*10/, shell_output("#{bin}/tiffdump test.tif")
+ end
end