Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
llvm: better test
  • Loading branch information
xu-cheng committed Oct 8, 2015
1 parent 182f16e commit 8c5be90
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Formula/llvm.rb
Expand Up @@ -175,6 +175,21 @@ def caveats
end

test do
system "#{bin}/llvm-config", "--version"
assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp

if build.with? "clang"
(testpath/"test.cpp").write <<-EOS.undent
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
EOS
system "#{bin}/clang++", "test.cpp", "-o", "test"
system "./test"
end
end
end

0 comments on commit 8c5be90

Please sign in to comment.