Backported tests for issue #28070.
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 588042a..5725a99 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -928,6 +928,9 @@
         q = p.match(upper_char)
         self.assertTrue(q)
 
+        self.assertTrue(re.match('(?ixu) ' + upper_char, lower_char))
+        self.assertTrue(re.match('(?ixu) ' + lower_char, upper_char))
+
     def test_dollar_matches_twice(self):
         "$ matches the end of string, and just before the terminating \n"
         pattern = re.compile('$')