aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/patch_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/email/patch_test.go')
-rw-r--r--pkg/email/patch_test.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/pkg/email/patch_test.go b/pkg/email/patch_test.go
index 0919db9ca..a2be0d6c9 100644
--- a/pkg/email/patch_test.go
+++ b/pkg/email/patch_test.go
@@ -10,13 +10,7 @@ import (
func TestParsePatch(t *testing.T) {
for _, test := range tests {
t.Run(test.title, func(t *testing.T) {
- title, diff, err := ParsePatch(test.text)
- if err != nil {
- t.Fatalf("failed to parse patch: %v", err)
- }
- if test.title != title {
- t.Fatalf("title mismatch, want:\n%v\ngot:\n%v", test.title, title)
- }
+ diff := ParsePatch([]byte(test.text))
if test.diff != diff {
t.Fatalf("diff mismatch, want:\n%v\ngot:\n%v", test.diff, diff)
}
@@ -478,4 +472,14 @@ Index: usb-devel/drivers/usb/core/hub.c
dev_err(hub->intfdev, "activate --> %d\n", status);
`,
},
+ {
+ text: `Some
+Text
+Without
+Any
+Diff
+`,
+ diff: "",
+ title: "test empty patch",
+ },
}