[Lldb-commits] [lldb] r227938 - Add an expectall() API that allows you to pass a list of patterns and have pexpect match *ALL* of them instead of just picking one
Enrico Granata
egranata at apple.com
Mon Feb 2 19:11:59 PST 2015
Author: enrico
Date: Mon Feb 2 21:11:59 2015
New Revision: 227938
URL: http://llvm.org/viewvc/llvm-project?rev=227938&view=rev
Log:
Add an expectall() API that allows you to pass a list of patterns and have pexpect match *ALL* of them instead of just picking one
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=227938&r1=227937&r2=227938&view=diff
==============================================================================
--- lldb/trunk/test/lldbpexpect.py (original)
+++ lldb/trunk/test/lldbpexpect.py Mon Feb 2 21:11:59 2015
@@ -32,6 +32,13 @@ class PExpectTest(TestBase):
else:
return self.child.expect(patterns, timeout=timeout)
+ def expectall(self, patterns=None, timeout=None, exact=None):
+ if patterns is None: return None
+ if timeout is None: timeout = self.timeout
+ if exact is None: exact = False
+ for pattern in patterns:
+ self.expect(pattern, timeout=timeout, exact=exact)
+
def sendimpl(self, sender, command, patterns=None, timeout=None, exact=None):
sender(command)
return self.expect(patterns=patterns, timeout=timeout, exact=exact)
More information about the lldb-commits
mailing list