From 350453f2d5b6cd5ea4d37924d6ebc818214cc757 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Mon, 6 Jun 2016 17:14:58 -0700 Subject: Make surrogate regex even more lenient. --- python/google/protobuf/internal/json_format_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/google/protobuf/internal/json_format_test.py b/python/google/protobuf/internal/json_format_test.py index 5394c017..9e32ea47 100644 --- a/python/google/protobuf/internal/json_format_test.py +++ b/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): -- cgit v1.2.3