From: Guido van Rossum Date: Tue, 30 Dec 1997 17:32:33 +0000 (+0000) Subject: Add tests for re.L(OCALE). X-Git-Tag: v1.5~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5910e42d129a860ae0f41cd23b136ad53a33a0d;p=python Add tests for re.L(OCALE). --- diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 83eab9fc52..99263b83da 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