summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-30 17:32:33 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-30 17:32:33 (GMT)
commitf5910e42d129a860ae0f41cd23b136ad53a33a0d (patch)
treee48a22f30679ed7c5ee61f55e30beef29810394e /Lib
parent74608f8b8aa571089f8170b0d80bae6746b16f28 (diff)
downloadcpython-f5910e42d129a860ae0f41cd23b136ad53a33a0d.zip
cpython-f5910e42d129a860ae0f41cd23b136ad53a33a0d.tar.gz
cpython-f5910e42d129a860ae0f41cd23b136ad53a33a0d.tar.bz2
Add tests for re.L(OCALE).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_re.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 83eab9f..99263b8 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -134,7 +134,7 @@ try:
except AssertionError:
raise TestFailed, 're module constants'
-for flags in [re.I, re.M, re.X, re.S]:
+for flags in [re.I, re.M, re.X, re.S, re.L]:
try:
r = re.compile('^pattern$', flags)
except:
@@ -229,4 +229,10 @@ for t in tests:
if result==None:
print '=== Fails on case-insensitive match', t
+ # Try the match with LOCALE enabled, and check that it
+ # still succeeds.
+ obj=re.compile(pattern, re.LOCALE)
+ result=obj.search(s)
+ if result==None:
+ print '=== Fails on locale-sensitive match', t