From ca057bb700062fe01b5da0465af2baafc6824fbb Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:07:01 -0800 Subject: [PATCH] MatcherTest: add non-ascii examples to match --- javatests/com/google/re2j/MatcherTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/javatests/com/google/re2j/MatcherTest.java b/javatests/com/google/re2j/MatcherTest.java index 4f24ae2e..c92622aa 100644 --- a/javatests/com/google/re2j/MatcherTest.java +++ b/javatests/com/google/re2j/MatcherTest.java @@ -46,6 +46,11 @@ public void testReplaceAll() { "Frog", "Lizard", "What the Lizard's Eye Tells the Lizard's Brain"); + ApiTestUtils.testReplaceAll( // Russian "the quick brown fox"... + "В чащах юга жил бы цитрус — да, но фальшивый экземпляр", + "цитрус", + "лимон Мейера", + "В чащах юга жил бы лимон Мейера — да, но фальшивый экземпляр"); ApiTestUtils.testReplaceAll( "What the Frog's Eye Tells the Frog's Brain", "F(rog)", @@ -56,6 +61,11 @@ public void testReplaceAll() { "(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)", "$10$20", "jb0wo0123"); + ApiTestUtils.testReplaceAll( + "абвгдеёжзийклмнопрстуфхцчьыъэюя123", + "(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)", + "$10$2\\0", + "иб0хн0ыъэюя123"); ApiTestUtils.testReplaceAll( "\u00e1\u0062\u00e7\u2655", "(.)", "<$1>", "<\u00e1><\u0062><\u00e7><\u2655>"); ApiTestUtils.testReplaceAll(