aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDavid Christenson2015-03-09 02:23:13 -0600
committerTim D. Smith2015-03-19 23:52:45 -0700
commit1a00e0d1fb8b825edb7ad3fda88c9bdb1d65d628 (patch)
tree0fe724aa7658bf358c87f25da86a0c553d0b4c65 /Library/Formula
parent2e8dcd56022323d418cb12bdee8ec7bd434ba04e (diff)
downloadhomebrew-1a00e0d1fb8b825edb7ad3fda88c9bdb1d65d628.tar.bz2
libechonest: add test
Compile and execute a simple test that utilizes libechonest. Closes #37465. Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libechonest.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/libechonest.rb b/Library/Formula/libechonest.rb
index 91b55aa2f..f91a24aee 100644
--- a/Library/Formula/libechonest.rb
+++ b/Library/Formula/libechonest.rb
@@ -21,4 +21,21 @@ class Libechonest < Formula
system "cmake", ".", *std_cmake_args
system "make", "install"
end
+
+ test do
+ (testpath/"test.cpp").write <<-EOS.undent
+ #include <echonest/Genre.h>
+ #include <echonest/Artist.h>
+ int main() {
+ Echonest::Genre test;
+ test.setName(QLatin1String("ambient trance"));
+ return 0;
+ }
+ EOS
+ qt = Formula["qt"]
+ system ENV.cxx, "test.cpp", "-L#{lib}", "-lechonest", "-F#{qt.opt_lib}",
+ "-framework", "QtCore", "-I#{qt.opt_include}/QtCore",
+ "-I#{qt.opt_include}/QtNetwork", "-o", "test"
+ system "./test"
+ end
end