File: bake.rb

package info (click to toggle)
ruby-protocol-http2 0.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 472 kB
  • sloc: ruby: 3,627; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.

# Run the fuzz test.
def run
	system("AFL_SKIP_BIN_CHECK=1 afl-fuzz -i input/ -o output/ -m 100 -- ruby script.rb")
end

def generate
	require_relative "../../lib/protocol/http2/framer"
	
	framer = Protocol::HTTP2::Framer.new($stdout)
	
	frame = Protocol::HTTP2::DataFrame.new
	frame.pack("Hello World")
	
	framer.write_frame(frame)
end