mirror of
https://github.com/golang/go
synced 2024-11-21 17:14:45 -07:00
failing test
This commit is contained in:
parent
6d39245514
commit
58020a2337
@ -4,7 +4,9 @@
|
||||
|
||||
package textproto
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
type canonicalHeaderKeyTest struct {
|
||||
in, out string
|
||||
@ -33,6 +35,17 @@ var canonicalHeaderKeyTests = []canonicalHeaderKeyTest{
|
||||
{"foo bar", "foo bar"},
|
||||
}
|
||||
|
||||
func TestNilMapSetOrAdd(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
t.Errorf("nil MIMEHeader caused panic: %v", r)
|
||||
}
|
||||
}()
|
||||
var h MIMEHeader
|
||||
h.Set("foo", "bar")
|
||||
h.Add("biz", "boo")
|
||||
}
|
||||
|
||||
func TestCanonicalMIMEHeaderKey(t *testing.T) {
|
||||
for _, tt := range canonicalHeaderKeyTests {
|
||||
if s := CanonicalMIMEHeaderKey(tt.in); s != tt.out {
|
||||
|
Loading…
Reference in New Issue
Block a user