mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-14 18:02:55 +01:00
Add error handling for base64 decoding in test
This commit adds a check for errors when decoding base64 strings in the b64linebreaker_test.go file. If an error occurs, it logs a meaningful error message, improving the test's robustness and clarity.
This commit is contained in:
parent
b31c7cf3a7
commit
0bac51746d
1 changed files with 3 additions and 0 deletions
|
@ -255,6 +255,9 @@ func FuzzBase64LineBreaker(f *testing.F) {
|
|||
}
|
||||
|
||||
decode, err := base64.StdEncoding.DecodeString(buffer.String())
|
||||
if err != nil {
|
||||
t.Errorf("failed to decode base64 data: %s", err)
|
||||
}
|
||||
if !bytes.Equal(data, decode) {
|
||||
t.Error("generated line breaker output differs from original data")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue