]> granicus.if.org Git - python/commitdiff
-- SRE 0.9.8: updated test scripts
authorFredrik Lundh <fredrik@pythonware.com>
Tue, 1 Aug 2000 13:01:43 +0000 (13:01 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Tue, 1 Aug 2000 13:01:43 +0000 (13:01 +0000)
Lib/test/output/test_re
Lib/test/output/test_sre
Lib/test/test_sre.py

index 8ec57fb3585e3b15e806afc899747a36e944880b..75c46fc243fb7e9c9afa38c3f2f63b0f847240dd 100644 (file)
@@ -1,12 +1 @@
 test_re
-=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
-=== Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
-=== Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
-=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
-=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
-=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
index 05bcead63b2ee10bb790b658e3a68d70231a498f..dbb6e9398da6f96db2ec1a660f1b25facf8a406f 100644 (file)
@@ -1,6 +1 @@
 test_sre
-=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
-=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
-=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
-=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
-=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
index a22c51a3ff635a1a5f9b7f0a22f4775ae7081a6b..52e50217ad53a47c345a06a81502b7f9824dfd91 100644 (file)
@@ -152,9 +152,10 @@ try:
     assert sre.split("(?::*)", ":a:b::c") == ['', 'a', 'b', 'c']
     assert sre.split("(:)*", ":a:b::c") == ['', ':', 'a', ':', 'b', ':', 'c']
     assert sre.split("([b:]+)", ":a:b::c") == ['', ':', 'a', ':b::', 'c']
-# FIXME: group problem
-#    assert sre.split("(b)|(:+)", ":a:b::c") == \
-#           ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
+##     print sre.split("(b)|(:+)", ":a:b::c")
+##     print ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
+##     assert sre.split("(b)|(:+)", ":a:b::c") == \
+##            ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
     assert sre.split("(?:b)|(?::+)", ":a:b::c") == ['', 'a', '', '', 'c']
 except AssertionError:
     raise TestFailed, "sre.split"
@@ -377,8 +378,8 @@ for t in tests:
             if result==None:
                 print '=== Fails on locale-sensitive match', t
 
-            # Try the match with UNICODE enabled, and check that it
-            # still succeeds.
+            # Try the match with UNICODE locale enabled, and check
+            # that it still succeeds.
             obj=sre.compile(pattern, sre.UNICODE)
             result=obj.search(s)
             if result==None: