changeset 180:760d38ee86d6

Fixed hanging in the built-in output validator when output lengths differ
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 29 Jun 2011 01:26:33 +0300
parents a55a1e00e121
children 91fe19d9eba4 8196d2c0d6f8
files upreckon/testcases.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/upreckon/testcases.py	Mon Jun 20 17:56:47 2011 +0300
+++ b/upreckon/testcases.py	Wed Jun 29 01:26:33 2011 +0300
@@ -207,6 +207,8 @@
 					refbuffer += refdata
 					if not (buffer or refbuffer or crlfhalf or refcrlfhalf):
 						break
+					elif not buffer and not crlfhalf or not refbuffer and not refcrlfhalf:
+						raise WrongAnswer
 					size = min(len(buffer), len(refbuffer))
 					if buffer[:size] != refbuffer[:size]:
 						raise WrongAnswer