diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-22 21:16:22 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-22 21:16:22 -0400 |
commit | 8fe6e0fe6e3d019ed90009f9d914864c9263f486 (patch) | |
tree | acdd6f3e0fed26fd9fdd714b7e56fefbe415a8b0 /cmd2.py | |
parent | 319e66b3076e340270fbb74eb01936f88b5c268c (diff) | |
download | cmd2-git-8fe6e0fe6e3d019ed90009f9d914864c9263f486.tar.gz |
Updated CHANGELOG with some text regarding recent enhancements to transcript regexes
Also bumped version from 0.7.7a to 0.7.7 in preparation for eventual next release.
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -98,7 +98,7 @@ if six.PY3: else: BROKEN_PIPE_ERROR = IOError -__version__ = '0.7.7a' +__version__ = '0.7.7' # Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past pyparsing.ParserElement.enablePackrat() @@ -2305,7 +2305,7 @@ class Cmd2TestCase(unittest.TestCase): break line_num += 1 expected = ''.join(expected) - + # transform the expected text into a valid regular expression expected = self._transform_transcript_expected(expected) message = '\nFile {}, line {}\nCommand was:\n{}\nExpected:\n{}\nGot:\n{}\n'.format( @@ -2318,7 +2318,7 @@ class Cmd2TestCase(unittest.TestCase): backslash = '\\' regex = '' start = 0 - + while True: (regex, first_slash_pos, start) = self._escaped_find(regex, s, start, False) if first_slash_pos == -1: @@ -2349,12 +2349,12 @@ class Cmd2TestCase(unittest.TestCase): def _escaped_find(self, regex, s, start, in_regex): """ Find the next slash in {s} after {start} that is not preceded by a backslash. - + If we find an escaped slash, add everything up to and including it to regex, updating {start}. {start} therefore serves two purposes, tells us where to start looking for the next thing, and also tells us where in {s} we have already added things to {regex} - + {in_regex} specifies whether we are currently searching in a regex, we behave differently if we are or if we aren't. """ |