diff options
Diffstat (limited to 'src/pkg/xml/xml_test.go')
| -rw-r--r-- | src/pkg/xml/xml_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pkg/xml/xml_test.go b/src/pkg/xml/xml_test.go index 43d418c1e..f228dfba3 100644 --- a/src/pkg/xml/xml_test.go +++ b/src/pkg/xml/xml_test.go @@ -5,6 +5,7 @@ package xml import ( + "bytes" "io" "os" "reflect" @@ -212,3 +213,18 @@ func TestSyntax(t *testing.T) { } } } + +type item struct { + Field_a string +} + +func TestIssue569(t *testing.T) { + data := `<item><field_a>abcd</field_a></item>` + var i item + buf := bytes.NewBufferString(data) + err := Unmarshal(buf, &i) + + if err != nil || i.Field_a != "abcd" { + t.Fatalf("Expecting abcd") + } +} |
