Browse Source

Make surrogate regex even more lenient.

Josh Haberman 9 years ago
parent
commit
350453f2d5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      python/google/protobuf/internal/json_format_test.py

+ 2 - 2
python/google/protobuf/internal/json_format_test.py

@@ -260,12 +260,12 @@ class JsonFormatTest(JsonFormatBase):
     # Error case: unpaired high surrogate.
     self.CheckError(
         '{"stringValue": "\\uD83D"}',
-        r'Invalid \\uXXXX escape|Unpaired (high )?surrogate')
+        r'Invalid \\uXXXX escape|Unpaired.*surrogate')
 
     # Unpaired low surrogate.
     self.CheckError(
         '{"stringValue": "\\uDE01"}',
-        r'Invalid \\uXXXX escape|Unpaired (high )?surrogate')
+        r'Invalid \\uXXXX escape|Unpaired.*surrogate')
 
 
   def testTimestampMessage(self):