[ruby/yarp] Fix test-unit API in fuzzer test
https://github.com/ruby/yarp/commit/d24f62566e
This commit is contained in:
parent
2d009805e7
commit
eac3da173a
@ -2,14 +2,11 @@
|
||||
|
||||
require_relative "test_helper"
|
||||
|
||||
module YARP
|
||||
# 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
|
||||
def self.snippet(name, source)
|
||||
define_method(:"test_fuzzer_#{name}") { YARP.dump(source) }
|
||||
end
|
||||
|
||||
snippet "incomplete global variable", "$"
|
||||
@ -26,3 +23,4 @@ class FuzzerTest < Test::Unit::TestCase
|
||||
snippet "incomplete escaped regex", "/a\\"
|
||||
snippet "unterminated heredoc with unterminated escape at end of file", "<<A\n\\"
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user