Mercurial > hg
comparison tests/run-tests.py @ 28568:4a908089fe29
run-tests: indent _processoutput to aid readability for next patch
The next commit will loop over the expected[pos] list, this change
makes that change easier to review.
author | timeless <timeless@mozdev.org> |
---|---|
date | Thu, 17 Mar 2016 20:54:36 +0000 |
parents | 412ee35a8005 |
children | 1ad0ddf8cccc |
comparison
equal
deleted
inserted
replaced
28567:ca52512ac709 | 28568:4a908089fe29 |
---|---|
1109 | 1109 |
1110 # Find the expected output at the current position. | 1110 # Find the expected output at the current position. |
1111 el = None | 1111 el = None |
1112 if expected.get(pos, None): | 1112 if expected.get(pos, None): |
1113 el = expected[pos].pop(0) | 1113 el = expected[pos].pop(0) |
1114 | 1114 if True: |
1115 r = TTest.linematch(el, lout) | 1115 r = TTest.linematch(el, lout) |
1116 if isinstance(r, str): | 1116 if isinstance(r, str): |
1117 if r == '+glob': | 1117 if r == '+glob': |
1118 lout = el[:-1] + ' (glob)\n' | 1118 lout = el[:-1] + ' (glob)\n' |
1119 r = '' # Warn only this line. | 1119 r = '' # Warn only this line. |
1120 elif r == '-glob': | 1120 elif r == '-glob': |
1121 lout = ''.join(el.rsplit(' (glob)', 1)) | 1121 lout = ''.join(el.rsplit(' (glob)', 1)) |
1122 r = '' # Warn only this line. | 1122 r = '' # Warn only this line. |
1123 elif r == "retry": | 1123 elif r == "retry": |
1124 postout.append(b' ' + el) | 1124 postout.append(b' ' + el) |
1125 continue | 1125 continue |
1126 else: | 1126 else: |
1127 log('\ninfo, unknown linematch result: %r\n' % r) | 1127 log('\ninfo, unknown linematch result: %r\n' % r) |
1128 r = False | 1128 r = False |
1129 if r: | 1129 if r: |
1130 postout.append(b' ' + el) | 1130 postout.append(b' ' + el) |
1131 else: | 1131 else: |
1132 if self.NEEDESCAPE(lout): | 1132 if self.NEEDESCAPE(lout): |
1133 lout = TTest._stringescape(b'%s (esc)\n' % | 1133 lout = TTest._stringescape(b'%s (esc)\n' % |