mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-02-09 22:46:04 +00:00
test: Update fuzz tests to use the built-in infrastructure
Go 1.18 supports fuzzing natively, so this patch migrates our fuzzing tests to make use of it.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package aliases
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -482,3 +483,10 @@ func TestHookError(t *testing.T) {
|
||||
t.Errorf("expected *exec.ExitError, got %T - %v", err, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Fuzz testing for the parser.
|
||||
func FuzzReader(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, data []byte) {
|
||||
parseReader("domain", bytes.NewReader(data))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user