[Lldb-commits] [lldb] r227904 - Allow pexpect exact matches
Enrico Granata
egranata at apple.com
Mon Feb 2 16:59:28 PST 2015
Author: enrico
Date: Mon Feb 2 18:59:28 2015
New Revision: 227904
URL: http://llvm.org/viewvc/llvm-project?rev=227904&view=rev
Log:
Allow pexpect exact matches
Modified:
lldb/trunk/test/lldbpexpect.py
Modified: lldb/trunk/test/lldbpexpect.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbpexpect.py?rev=227904&r1=227903&r2=227904&view=diff
==============================================================================
--- lldb/trunk/test/lldbpexpect.py (original)
+++ lldb/trunk/test/lldbpexpect.py Mon Feb 2 18:59:28 2015
@@ -20,20 +20,24 @@ class PExpectTest(TestBase):
self.timeout = 5
self.child = pexpect.spawn('%s %s' % (self.lldbHere, self.launchArgs()))
- def expect(self, patterns=None, timeout=None):
+ def expect(self, exact=None, patterns=None, timeout=None, exact=None):
if patterns is None: return None
if timeout is None: timeout = self.timeout
- return self.child.expect(patterns, timeout=timeout)
+ if exact is None: exact = False
+ if exact:
+ return self.child.expect_exact(patterns, timeout=timeout)
+ else:
+ return self.child.expect(patterns, timeout=timeout)
- def sendimpl(self, sender, command, patterns=None, timeout=None):
+ def sendimpl(self, sender, command, patterns=None, timeout=None, exact=None):
sender(command)
- return self.expect(patterns=patterns, timeout=timeout)
+ return self.expect(patterns=patterns, timeout=timeout, exact=exact)
- def send(self, command, patterns=None, timeout=None):
- return self.sendimpl(self.child.send, command, patterns, timeout)
+ def send(self, command, patterns=None, timeout=None, exact=None):
+ return self.sendimpl(self.child.send, command, patterns, timeout, exact)
- def sendline(self, command, patterns=None, timeout=None):
- return self.sendimpl(self.child.sendline, command, patterns, timeout)
+ def sendline(self, command, patterns=None, timeout=None, exact=None):
+ return self.sendimpl(self.child.sendline, command, patterns, timeout, exact)
def quit(self, gracefully=None):
if gracefully is None: gracefully = True
More information about the lldb-commits
mailing list