summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sre.py
Commit message (Collapse)AuthorAgeFilesLines
* bug #133283, #477728, #483789, #490573Fredrik Lundh2001-12-091-1/+1
| | | | | | | backed out of broken minimal repeat patch from July also fixed a couple of minor potential resource leaks in pattern_subx (Guido had already fixed the big one)
* Remove erroneous and confusing comment -- sre patterns *can* beGuido van Rossum2001-12-081-2/+2
| | | | | pickled and we do *not* expect exceptions from either pickle or cPickle.
* added finditer sanity checkFredrik Lundh2001-10-281-0/+11
|
* sre.split should return the last segment, even if emptyFredrik Lundh2001-10-221-0/+1
| | | | (sorry, barry)
* sre.Scanner fixes (from Greg Chapman). also added a Scanner sanityFredrik Lundh2001-10-211-0/+20
| | | | | | check to the test suite. added a few missing exception checks in the _sre module
* SRE bug #441409:Fredrik Lundh2001-10-181-0/+6
| | | | | | | | compile should raise error for non-strings SRE bug #432570, 448951: reset group after failed match also bumped version number to 2.2.0
* fixed #449964: sre.sub raises an exception if the template contains aFredrik Lundh2001-09-181-0/+3
| | | | | | \g<x> group reference followed by a character escape (also restructured a few things on the way to fixing #449000)
* an SRE bugfix a day keeps Guido away...Fredrik Lundh2001-09-181-0/+4
| | | | | | | #462270: sub-tle difference between pre.sub and sre.sub. PRE ignored an empty match at the previous location, SRE didn't. also synced with Secret Labs "sreopen" codebase.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-5/+6
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* Check in a testcase for SF bug #449000: re.sub(r'\n', ...) broke.Guido van Rossum2001-08-101-0/+6
|
* reapplied darryl gallion's minimizing repeat fix. I'm still not 100%Fredrik Lundh2001-07-021-1/+1
| | | | | sure about this one, but test #133283 now works even with the fix in place, and so does the test suite. we'll see what comes up...
* SRE 2.1b2: increase the chances that the sre test works on otherFredrik Lundh2001-03-221-6/+3
| | | | machines...
* sre 2.1b2 update:Fredrik Lundh2001-03-221-0/+2
| | | | | | - take locale into account for word boundary anchors (#410271) - restored 2.0's *? behaviour (#233283, #408936 and others) - speed up re.sub/re.subn
* - restored 1.5.2 compatibility (sorry, eric)Fredrik Lundh2001-02-181-1/+1
| | | | | - removed __all__ cruft from internal modules (sorry, skip) - don't assume ASCII for string escapes (sorry, per)
* String method conversion.Eric S. Raymond2001-02-091-1/+1
| | | | (This one was trivial -- no actual string. references in it!)
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* bumped SRE version number to 2.1. cleaned up and added 1.5.2Fredrik Lundh2001-01-161-7/+17
| | | | compatibility patches.
* -- don't use recursion for unbounded non-greedy repeatFredrik Lundh2001-01-141-1/+1
| | | | | | | | (bugs #115903, #115696) This is based on a patch by Darrel Gallion. I'm not 100% sure about this fix, but I haven't managed to come up with any test case it cannot handle...
* reapplied Fred's "recommended style" patch...Fredrik Lundh2001-01-141-8/+8
|
* SRE fixes for 2.1 alpha:Fredrik Lundh2001-01-141-8/+8
| | | | | | | | | | -- added some more docstrings -- fixed typo in scanner class (#125531) -- the multiline flag (?m) should't affect the \Z operator (#127259) -- fixed non-greedy backtracking bug (#123769, #127259) -- added sre.DEBUG flag (currently dumps the parsed pattern structure) -- fixed a couple of glitches in groupdict (the #126587 memory leak had already been fixed by AMK)
* Update the code to better reflect recommended style:Fred Drake2000-12-121-8/+8
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* -- properly reset groups in findall (bug #117612)Fredrik Lundh2000-10-281-0/+3
| | | | | | | | -- fixed negative lookbehind to work correctly at the beginning of the target string (bug #117242) -- improved syntax check; you can no longer refer to a group inside itself (bug #110866)
* - don't hang if group id is followed by whitespace (closes bug #114660)Fredrik Lundh2000-09-241-0/+3
|
* updated SRE test suite (fixes PEP223 problem, shows syntax errors)Fredrik Lundh2000-09-031-76/+78
|
* Repair failing test_sre.py.Tim Peters2000-09-031-3/+3
| | | | | | | | | This was a funny one! The test very subtly relied on 1.5.2's behavior of treating "\x%" as "\x%", i.e. ignoring that was an \x escape that didn't make sense. But /F implemented PEP 223, which causes 2.0 to raise an exception on the bad escape. Fixed by merely making the 3 such strings of this kind into raw strings.
* return -1 for undefined groups (as implemented in 1.5.2) instead ofFredrik Lundh2000-09-021-1/+6
| | | | None (as documented) from start/end/span. closes bug #113254
* -- tightened up parsing of octal numbersFredrik Lundh2000-09-021-189/+150
| | | | | -- improved the SRE test harness: don't use asserts, test a few more things (including more boundary conditions)
* -- changed findall to return empty strings instead of NoneFredrik Lundh2000-08-091-0/+1
| | | | for undefined groups
* -- added recursion limit (currently ~10,000 levels)Fredrik Lundh2000-08-031-0/+10
| | | | | | | -- improved error messages -- factored out SRE_COUNT; the same code is used by SRE_OP_REPEAT_ONE_TEMPLATE -- minor cleanups
* -- SRE 0.9.8: now that the bug is fixed, I might as well enableFredrik Lundh2000-08-011-4/+2
| | | | the test again...
* -- SRE 0.9.8: updated test scriptsFredrik Lundh2000-08-011-5/+6
|
* - added lookbehind support (?<=pattern), (?<!pattern).Fredrik Lundh2000-07-031-25/+25
| | | | | | | | | | | | | | | | | the pattern must have a fixed width. - got rid of array-module dependencies; the match pro- gram is now stored inside the pattern object, rather than in an extra string buffer. - cleaned up a various of potential leaks, api abuses, and other minors in the engine module. - use mal's new isalnum macro, rather than my own work- around. - untabified test_sre.py. seems like I removed a couple of trailing spaces in the process...
* - pedantic: make sure "python -t" doesn't complain...Fredrik Lundh2000-06-301-5/+5
|
* - fixed default value handling in group/groupdictFredrik Lundh2000-06-301-0/+385
- added test suite