Mercurial > hg-stable
changeset 2246:3fd603eb6add
run-tests.py: print diff if reference output not existing.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 10 May 2006 10:07:53 -0700 |
parents | caf2c6ef5b0e |
children | 546c76e5a3e6 |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Wed May 10 11:53:56 2006 +0200 +++ b/tests/run-tests.py Wed May 10 10:07:53 2006 -0700 @@ -182,10 +182,12 @@ f = open(ref, "r") ref_out = f.read().splitlines() f.close() - if out != ref_out: - diffret = 1 - print "\nERROR: %s output changed" % (test) - show_diff(ref_out, out) + else: + ref_out = '' + if out != ref_out: + diffret = 1 + print "\nERROR: %s output changed" % (test) + show_diff(ref_out, out) if ret: print "\nERROR: %s failed with error code %d" % (test, ret) elif diffret: