1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-05 17:37:03 +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("")

View File

@@ -1,14 +0,0 @@
# First some valid cases.
a: b
c: d@e, f,
x: | command
# The following is invalid, should be ignored.
a@dom: x@dom
# Overrides.
o1: a
o1: b
# Finally one to make the file NOT end in \n:
y: z

View File

@@ -1,12 +0,0 @@
# Easy aliases.
pepe: jose
joan: juan
# UTF-8 aliases.
pitanga: ñangapirí
añil: azul, índigo
# Pipe aliases.
tubo: | writemailto ../.data/pipe_alias_worked

View File

@@ -1,3 +0,0 @@
fail: | false

View File

@@ -1,2 +0,0 @@
aliasA: aliasB@srv-B