diff options
| author | Mike Dalessio <mike.dalessio@gmail.com> | 2023-08-29 16:36:18 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-30 18:27:47 +0000 |
| commit | 440cdceffb7efef0aa93ad519b056a25d610f52d (patch) | |
| tree | 0d14839620f6a3d6a948db4ab36a9d47ee9124e9 /test | |
| parent | f652c05a59506dfe931f23db4965f7e40033de5e (diff) | |
[ruby/yarp] test: new test file for capturing interesting fuzzer snippets
Note that we call `YARP.dump` for these fuzzer tests to better match
the fuzz.parse harness, which also serializes.
https://github.com/ruby/yarp/commit/032ad047e9
Diffstat (limited to 'test')
| -rw-r--r-- | test/yarp/fuzzer_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/yarp/fuzzer_test.rb b/test/yarp/fuzzer_test.rb new file mode 100644 index 0000000000..3aed73ecd5 --- /dev/null +++ b/test/yarp/fuzzer_test.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require_relative "test_helper" + +# These tests are simply to exercise snippets found by the fuzzer that caused invalid memory access. +class FuzzerTest < Test::Unit::TestCase + class << self + def snippet(name, source) + test "fuzzer #{name}" do + YARP.dump(source) + end + end + end +end |
