summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2024-04-17 11:42:30 +1200
committerAndrew Bartlett <abartlet@samba.org>2024-04-23 01:33:29 +0000
commit078ecf486a62dc3aaa2842ada96456ac9870dad7 (patch)
tree4fbe6de69f608486c95bfb781200e29290626090 /lib/ldb/tests/python/api.py
parenta75c98ad688415aec8afc617a759ba90cfd9f23b (diff)
downloadsamba-078ecf486a62dc3aaa2842ada96456ac9870dad7.tar.gz
samba-078ecf486a62dc3aaa2842ada96456ac9870dad7.tar.bz2
samba-078ecf486a62dc3aaa2842ada96456ac9870dad7.zip
ldb:pytests: test for Turkic i-dots in ldb_comparison_fold
In tr_TR and some other locales where the letter 'i' uppercases to 'İ', which is not ideal for LDB as we need certain strings like 'guid' to casefold in the ASCII way. In fixing https://bugzilla.samba.org/show_bug.cgi?id=15248) we solved this problem in many cases, but for unindexed searches where the 'i' is not the last character in the string. This test shows that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15637 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/tests/python/api.py')
-rwxr-xr-xlib/ldb/tests/python/api.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 88dfa8c3b71..0fc31e3fe09 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -1341,6 +1341,22 @@ class SearchTests(LdbBaseTest):
expression="(ou=unique)")
self.assertEqual(len(res11), 1)
+ def test_subtree_uni123_elsewhere(self):
+ """Testing a search, where the search term contains a (normal ASCII)
+ dotted-i, that will be upper-cased to 'İ', U+0130, LATIN
+ CAPITAL LETTER I WITH DOT ABOVE in certain locales including
+ tr_TR in which this test is sometimes run.
+
+ The search term should fail because the ou does not exist, but
+ we used to get it wrong in unindexed searches which stopped
+ comparing at the i, ignoring the rest of the string, which is
+ not the same as the existing ou ('123' != 'que').
+ """
+ res11 = self.l.search(base="DC=EXAMPLE,DC=NET",
+ scope=ldb.SCOPE_SUBTREE,
+ expression="(ou=uni123)")
+ self.assertEqual(len(res11), 0)
+
def test_subtree_unique_elsewhere3(self):
"""Testing a search"""