qbs: add test.

This commit is contained in:
Mike McQuaid 2014-10-30 09:02:01 +00:00
parent 18dcb7d20c
commit 5cc13c763a

View file

@ -18,4 +18,24 @@ class Qbs < Formula
system "qmake", "qbs.pro", "-r" system "qmake", "qbs.pro", "-r"
system "make", "install", "INSTALL_ROOT=#{prefix}" system "make", "install", "INSTALL_ROOT=#{prefix}"
end end
test do
(testpath/"test.c").write <<-EOS.undent
int main() {
return 0;
}
EOS
(testpath/"test.qbp").write <<-EOS.undent
import qbs
CppApplication {
name: "test"
files: "test.c"
consoleApplication: true
}
EOS
system "#{bin}/qbs", "run", "-f", "test.qbp", "profile:clang"
end
end end