make colons optional in text parser. (missed update in google-internal code)
add test.
R=dsymonds, dsymonds1
http://codereview.appspot.com/1733042
diff --git a/proto/text_parser_test.go b/proto/text_parser_test.go
index 96ec965..5382ac5 100644
--- a/proto/text_parser_test.go
+++ b/proto/text_parser_test.go
@@ -132,6 +132,20 @@
},
},
+ // Repeated message with/without colon and <>/{}
+ UnmarshalTextTest{
+ in: `count:42 others:{} others{} others:<> others:{}`,
+ out: &MyMessage{
+ Count: Int32(42),
+ Others: []*OtherMessage{
+ &OtherMessage{},
+ &OtherMessage{},
+ &OtherMessage{},
+ &OtherMessage{},
+ },
+ },
+ },
+
// Missing colon for inner message
UnmarshalTextTest{
in: `count:42 inner < host: "cauchy.syd" >`,