mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
initial commit
This commit is contained in:
commit
18933c6767
1841 changed files with 810642 additions and 0 deletions
23
vendor/github.com/mytrile/mime-ext/mime-ext_test.go
generated
vendored
Normal file
23
vendor/github.com/mytrile/mime-ext/mime-ext_test.go
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
package mimeext
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"mime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_AddingMimeTypes(t *testing.T) {
|
||||
for key, _ := range allMimeTypes {
|
||||
if strings.HasPrefix(allMimeTypes[key], "text/") {
|
||||
if mime.TypeByExtension(key) != fmt.Sprintf("%s; charset=utf-8", allMimeTypes[key]) {
|
||||
t.Errorf("Missing mime type: %s", allMimeTypes[key])
|
||||
}
|
||||
} else {
|
||||
if mime.TypeByExtension(key) != allMimeTypes[key] {
|
||||
t.Errorf("Missing mime type: %s", allMimeTypes[key])
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue