File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
6
6
# mime package test for globs2
7
- 50:application /test:*.t1
8
- 50:text /test:*.t2
7
+ 50:document /test:*.t3
8
+ 50:example /test:*.t4
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ func initMimeUnix() {
97
97
}
98
98
99
99
func initMimeForTests () map [string ]string {
100
- mimeGlobs = []string {"testdata/test.types.globs2 " }
100
+ mimeGlobs = []string {"" }
101
101
typeFiles = []string {"testdata/test.types" }
102
102
return map [string ]string {
103
103
".T1" : "application/test" ,
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import (
8
8
"testing"
9
9
)
10
10
11
- func initMimeUnixTest () {
11
+ func initMimeUnixTest (t * testing. T ) {
12
12
err := loadMimeGlobsFile ("testdata/test.types.globs2" )
13
13
if err != nil {
14
- panic (err )
14
+ t . Fatal (err )
15
15
}
16
16
17
17
loadMimeFile ("testdata/test.types" )
18
18
}
19
19
20
20
func TestTypeByExtensionUNIX (t * testing.T ) {
21
- initMimeUnixTest ()
21
+ initMimeUnixTest (t )
22
22
typeTests := map [string ]string {
23
23
".T1" : "application/test" ,
24
24
".t2" : "text/test; charset=utf-8" ,
25
+ ".t3" : "document/test" ,
26
+ ".t4" : "example/test" ,
25
27
".png" : "image/png" ,
26
28
}
27
29
You can’t perform that action at this time.
0 commit comments