mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
20 lines
536 B
Ruby
20 lines
536 B
Ruby
# 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
|
|
|
|
snippet "incomplete global variable", "$"
|
|
snippet "incomplete symbol", ":"
|
|
snippet "incomplete escaped string", '"\\'
|
|
snippet "trailing comment", "1\n#\n"
|
|
snippet "trailing asterisk", "a *"
|
|
end
|