aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/feed/meta_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/feed/meta_test.go b/internal/feed/meta_test.go
index 640926c..7c61dd1 100644
--- a/internal/feed/meta_test.go
+++ b/internal/feed/meta_test.go
@@ -88,11 +88,17 @@ sha256:B86258D5D9861507A1894A7B92011764803D7267787B1487539E240EA2405440
})
}
+ longVal := make([]byte, 65536)
+ for i := 0; i < cap(longVal); i++ {
+ longVal[i] = 'a'
+ }
+
failTests := []struct {
val string
exp string
} {
{ "asdf", "bad meta line: \"asdf\"" },
+ { "lastModifiedDate:asdf", "parsing time \"asdf\" as \"2006-01-02T15:04:05Z07:00\": cannot parse \"asdf\" as \"2006\"" },
{ "size:a", "invalid size: \"a\"" },
{ "zipSize:a", "invalid zipSize: \"a\"" },
{ "gzSize:a", "invalid gzSize: \"a\"" },
@@ -101,6 +107,7 @@ sha256:B86258D5D9861507A1894A7B92011764803D7267787B1487539E240EA2405440
val: "sha256:0z00000000000000000000000000000000000000000000000000000000000000",
exp: "invalid sha256 hash: encoding/hex: invalid byte: U+007A 'z'",
},
+ { string(longVal), "bufio.Scanner: token too long" },
{ "foo:bar", "unknown key: \"foo\"" },
}