1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

test: Add the embedded aliases file to the fuzz corpus

This patch adds the embedded aliases file to the fuzz corpus, because it
is trivial to do so, and is a reasonable seed which will be naturally
adjusted over time as the package evolves (as it happened in recent
commits).
This commit is contained in:
Alberto Bertogli
2023-10-07 16:39:35 +01:00
parent 5cdbd9ff6e
commit f5d8c68a39

View File

@@ -606,6 +606,7 @@ func FuzzReader(f *testing.F) {
resolver.AddDomain("domain") resolver.AddDomain("domain")
resolver.DropChars = "." resolver.DropChars = "."
resolver.SuffixSep = "-+" resolver.SuffixSep = "-+"
f.Add([]byte(richFileContents))
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
resolver.parseReader("domain", bytes.NewReader(data)) resolver.parseReader("domain", bytes.NewReader(data))
}) })