8 "github.com/mjl-/mox/mlog"
11func FuzzParseMessage(f *testing.F) {
13 add := func(p string) {
14 buf, err := os.ReadFile(p)
16 f.Fatalf("reading file %q: %v", p, err)
20 add(filepath.FromSlash("../testdata/junk/parse.eml"))
21 add(filepath.FromSlash("../testdata/junk/parse2.eml"))
22 add(filepath.FromSlash("../testdata/junk/parse3.eml"))
24 dbPath := filepath.FromSlash("../testdata/junk/parse.db")
25 bloomPath := filepath.FromSlash("../testdata/junk/parse.bloom")
28 params := Params{Twograms: true}
29 log := mlog.New("junk", nil)
30 jf, err := NewFilter(ctxbg, log, params, dbPath, bloomPath)
32 f.Fatalf("new filter: %v", err)
34 f.Fuzz(func(t *testing.T, s string) {