mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-07 17:47:14 +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:
@@ -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")
|
||||
@@ -0,0 +1,2 @@
|
||||
go test fuzz v1
|
||||
[]byte("\nfail: | false\n\n")
|
||||
@@ -0,0 +1,2 @@
|
||||
go test fuzz v1
|
||||
[]byte("\naliasA: aliasB@srv-B\n")
|
||||
@@ -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")
|
||||
@@ -0,0 +1,2 @@
|
||||
go test fuzz v1
|
||||
[]byte("")
|
||||
14
internal/aliases/testdata/fuzz/corpus/t-002
vendored
14
internal/aliases/testdata/fuzz/corpus/t-002
vendored
@@ -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
|
||||
12
internal/aliases/testdata/fuzz/corpus/t-003
vendored
12
internal/aliases/testdata/fuzz/corpus/t-003
vendored
@@ -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
|
||||
|
||||
3
internal/aliases/testdata/fuzz/corpus/t-004
vendored
3
internal/aliases/testdata/fuzz/corpus/t-004
vendored
@@ -1,3 +0,0 @@
|
||||
|
||||
fail: | false
|
||||
|
||||
2
internal/aliases/testdata/fuzz/corpus/t-005
vendored
2
internal/aliases/testdata/fuzz/corpus/t-005
vendored
@@ -1,2 +0,0 @@
|
||||
|
||||
aliasA: aliasB@srv-B
|
||||
Reference in New Issue
Block a user