diff options
| author | Mike McQuaid | 2014-12-07 17:42:13 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-07 17:42:13 +0000 |
| commit | 138f2fcf53ff9a9a1a933ad6876540ec196f915f (patch) | |
| tree | 78158002345d9353f5a283e83c770b8b2fb7d843 /Library/Formula | |
| parent | d29f98b6cc57ea10325899b8ba5397ff76beb4b9 (diff) | |
| download | homebrew-138f2fcf53ff9a9a1a933ad6876540ec196f915f.tar.bz2 | |
afl-fuzz: tweak test.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/afl-fuzz.rb | 14 |
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 |
