qbs: add test.
This commit is contained in:
parent
18dcb7d20c
commit
5cc13c763a
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue