aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/internal/text_format_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/google/protobuf/internal/text_format_test.py')
-rwxr-xr-xpython/google/protobuf/internal/text_format_test.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py
index a52f133f..ed3445f2 100755
--- a/python/google/protobuf/internal/text_format_test.py
+++ b/python/google/protobuf/internal/text_format_test.py
@@ -828,6 +828,10 @@ class Proto2Tests(TextFormatBase):
' }\n'
' }\n'
' [unknown_extension]: 5\n'
+ ' [unknown_extension_with_number_field] {\n'
+ ' 1: "some_field"\n'
+ ' 2: -0.451\n'
+ ' }\n'
'}\n')
text_format.Parse(text, message, allow_unknown_extension=True)
golden = 'message_set {\n}\n'
@@ -894,7 +898,6 @@ class Proto2Tests(TextFormatBase):
message = unittest_mset_pb2.TestMessageSetContainer()
malformed = ('message_set {\n'
' unknown_field: true\n'
- ' \n' # Missing '>' here.
'}\n')
six.assertRaisesRegex(self,
text_format.ParseError,
@@ -906,7 +909,7 @@ class Proto2Tests(TextFormatBase):
message,
allow_unknown_extension=True)
- # Parse known extension correcty.
+ # Parse known extension correctly.
message = unittest_mset_pb2.TestMessageSetContainer()
text = ('message_set {\n'
' [protobuf_unittest.TestMessageSetExtension1] {\n'