BlueGit

timfa bluegit

Files

bluegit / internal / gitrepo / http_test.go

http_test.go

fix: pak gzip-requests van smart HTTP uit
timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa · 3 weeks ago
Passed 18fda33e History
http_test.go 440 B Download Raw
1package gitrepo
2
3import "testing"
4
5func TestGzipContentEncoding(t *testing.T) {
6 cases := []struct{ in, want string }{
7 {"", ""},
8 {"identity", ""},
9 {"deflate", ""},
10 {"gzip", "gzip"},
11 {"GZIP", "gzip"},
12 {"x-gzip", "x-gzip"},
13 {"gzip, deflate", "gzip"},
14 {" gzip ", "gzip"},
15 }
16 for _, tc := range cases {
17 if got := gzipContentEncoding(tc.in); got != tc.want {
18 t.Errorf("%q: %q, verwacht %q", tc.in, got, tc.want)
19 }
20 }
21}