Show More
@@ -1160,6 +1160,7 b' class TTest(Test):' | |||
|
1160 | 1160 | els = expected[pos] |
|
1161 | 1161 | |
|
1162 | 1162 | i = 0 |
|
1163 | optional = [] | |
|
1163 | 1164 | while i < len(els): |
|
1164 | 1165 | el = els[i] |
|
1165 | 1166 | |
@@ -1181,11 +1182,18 b' class TTest(Test):' | |||
|
1181 | 1182 | if r: |
|
1182 | 1183 | els.pop(i) |
|
1183 | 1184 | break |
|
1185 | if el and el.endswith(b" (?)\n"): | |
|
1186 | optional.append(i) | |
|
1184 | 1187 | i += 1 |
|
1185 | 1188 | |
|
1186 | 1189 | if r: |
|
1187 | 1190 | if r == "retry": |
|
1188 | 1191 | continue |
|
1192 | # clean up any optional leftovers | |
|
1193 | for i in optional: | |
|
1194 | postout.append(b' ' + els[i]) | |
|
1195 | for i in reversed(optional): | |
|
1196 | del els[i] | |
|
1189 | 1197 | postout.append(b' ' + el) |
|
1190 | 1198 | else: |
|
1191 | 1199 | if self.NEEDESCAPE(lout): |
General Comments 0
You need to be logged in to leave comments.
Login now