aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike McQuaid2014-12-07 17:42:13 +0000
committerMike McQuaid2014-12-07 17:42:13 +0000
commit138f2fcf53ff9a9a1a933ad6876540ec196f915f (patch)
tree78158002345d9353f5a283e83c770b8b2fb7d843 /Library/Formula
parentd29f98b6cc57ea10325899b8ba5397ff76beb4b9 (diff)
downloadhomebrew-138f2fcf53ff9a9a1a933ad6876540ec196f915f.tar.bz2
afl-fuzz: tweak test.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/afl-fuzz.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Formula/afl-fuzz.rb b/Library/Formula/afl-fuzz.rb
index c98a7f0a7..825ba23ce 100644
--- a/Library/Formula/afl-fuzz.rb
+++ b/Library/Formula/afl-fuzz.rb
@@ -20,19 +20,19 @@ class AflFuzz < Formula
test do
cpp_file = testpath/"main.cpp"
- exe_file = testpath/"a.out"
+ exe_file = testpath/"test"
- cpp_file.write(
- <<-EOS.undent
+ cpp_file.write <<-EOS.undent
#include <iostream>
int main() {
- std::cout << "Hello, world!";
+ std::cout << "Hello, world!";
}
EOS
- )
- system "afl-clang++", cpp_file, "-o", exe_file
- assert_equal `#{exe_file}`, "Hello, world!"
+ system "#{bin}/afl-clang++", "-g", cpp_file, "-o", exe_file
+ output = `#{exe_file}`
+ assert_equal 0, $?.exitstatus
+ assert_equal output, "Hello, world!"
end
end