comparison tests/hghave.py @ 27114:a636a46f5094

hghave.py: fix matchoutput documentation
author timeless <timeless@mozdev.org>
date Tue, 24 Nov 2015 22:31:56 +0000
parents 0f76c64f5cc3
children e1f55b50edcb
comparison
equal deleted inserted replaced
27113:77850d2a161c 27114:a636a46f5094
66 66
67 if result['skipped'] or result['error']: 67 if result['skipped'] or result['error']:
68 sys.exit(1) 68 sys.exit(1)
69 69
70 def matchoutput(cmd, regexp, ignorestatus=False): 70 def matchoutput(cmd, regexp, ignorestatus=False):
71 """Return True if cmd executes successfully and its output 71 """Return the match object if cmd executes successfully and its output
72 is matched by the supplied regular expression. 72 is matched by the supplied regular expression.
73 """ 73 """
74 r = re.compile(regexp) 74 r = re.compile(regexp)
75 try: 75 try:
76 p = subprocess.Popen( 76 p = subprocess.Popen(