libechonest: add test
Compile and execute a simple test that utilizes libechonest. Closes Homebrew/homebrew#37465. Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
parent
7628317d77
commit
27b13ce7ae
1 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue