summaryrefslogtreecommitdiff
path: root/third_party/re2/src/python/re2_test.py
diff options
context:
space:
mode:
authorCronet Mainline Eng <cronet-mainline-eng+copybara@google.com>2024-06-07 18:59:21 +0900
committerMotomu Utsumi <motomuman@google.com>2024-06-07 19:00:37 +0900
commit93dc77d4cfa4a2996ac5bf4c67b0d4223847eb65 (patch)
tree92c5aba3655194ff55d27c652a265bd6f87b0470 /third_party/re2/src/python/re2_test.py
parentb66ce594f84a102bf71c3e2754d9c0bfdd620b85 (diff)
downloadcronet-93dc77d4cfa4a2996ac5bf4c67b0d4223847eb65.tar.gz
Import Cronet version 124.0.6367.42
FolderOrigin-RevId: /tmp/copybara-origin/src Change-Id: I727d2277512236d7d0db42e102d291b6204b38e5
Diffstat (limited to 'third_party/re2/src/python/re2_test.py')
-rw-r--r--third_party/re2/src/python/re2_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/re2/src/python/re2_test.py b/third_party/re2/src/python/re2_test.py
index 86aa9ae51..df1a9eb70 100644
--- a/third_party/re2/src/python/re2_test.py
+++ b/third_party/re2/src/python/re2_test.py
@@ -477,6 +477,13 @@ class FilterTest(absltest.TestCase):
# Verify whether the underlying RE2 object is usable.
self.assertEqual(0, f.re(2).groups)
+ def test_issue_484(self):
+ # Previously, the shim would dereference a null pointer and crash.
+ f = re2.Filter()
+ with self.assertRaisesRegex(re2.error,
+ r'Match\(\) called before compiling'):
+ f.Match('')
+
if __name__ == '__main__':
absltest.main()