1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-21 15:17:01 +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:
Alberto Bertogli
2023-02-05 12:30:25 +00:00
parent a54d81f406
commit efefee9fbb
88 changed files with 246 additions and 470 deletions

View File

@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("# First some valid cases.\na: b\nc: d@e, f,\nx: | command\n\n# The following is invalid, should be ignored.\na@dom: x@dom\n\n# Overrides.\no1: a\no1: b\n\n# Finally one to make the file NOT end in \\n:\ny: z\n")

View File

@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("\nfail: | false\n\n")

View File

@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("\naliasA: aliasB@srv-B\n")

View File

@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("\n# Easy aliases.\npepe: jose\njoan: juan\n\n# UTF-8 aliases.\npitanga: ñangapirí\nañil: azul, índigo\n\n# Pipe aliases.\ntubo: | writemailto ../.data/pipe_alias_worked\n\n")

View File

@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("")