git » chasquid » commit f5d8c68

test: Add the embedded aliases file to the fuzz corpus

author Alberto Bertogli
2023-10-07 15:39:35 UTC
committer Alberto Bertogli
2023-10-07 15:41:26 UTC
parent 5cdbd9ff6eee1656b5d7d3fe22b39aa730d1e3f0

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).

internal/aliases/aliases_test.go +1 -0

diff --git a/internal/aliases/aliases_test.go b/internal/aliases/aliases_test.go
index 8dafc8e..3f96ebf 100644
--- a/internal/aliases/aliases_test.go
+++ b/internal/aliases/aliases_test.go
@@ -606,6 +606,7 @@ func FuzzReader(f *testing.F) {
 	resolver.AddDomain("domain")
 	resolver.DropChars = "."
 	resolver.SuffixSep = "-+"
+	f.Add([]byte(richFileContents))
 	f.Fuzz(func(t *testing.T, data []byte) {
 		resolver.parseReader("domain", bytes.NewReader(data))
 	})