| | # usage: python check.py --help |
---|
| | # |
---|
| | #@author: michael.karlen@epfl.ch |
---|
| | #@version: 1.0 |
---|
| | #@date: 27. 1. 2006 |
---|
| | #@version: 1.1 |
---|
| | #@date: 2. 2. 2006 |
---|
| | # |
---|
| | #~iclamp/soft/bin/risc-emu |
---|
| | COMPILER = "scala -cp classes zweic.GeneratorTest" |
---|
| | #RISC = "java -cp risc/lib/risc.jar risc.emulator.Main" |
---|
| |
---|
| | if self.spreadUT and match: |
---|
| | #replace newlines |
---|
| | f = match.group(1).replace(r'\n','\n') |
---|
| | ret.append(f) |
---|
| | |
---|
| | return "".join(ret) |
---|
| | |
---|
| | ret = "".join(ret) |
---|
| | if ret [-1] == "\r": |
---|
| | ret = ret[:-1] |
---|
| | return ret |
---|
| | |
---|
| | |
---|
| | def error(self, fname, expected, found): |
---|
| | # error message for broken files |
---|
| |
---|
| | print >>sys.stderr, "* '%s' broken: " % fname |
---|
| | print >>sys.stderr, ("%-" + options.tabbing + "s %s") \ |
---|
| | % ("expected", "found") |
---|
| | for e, f in xzip(expected, found): |
---|
| | print >>sys.stderr, ("%-" + options.tabbing + "s %s") % (e, f) |
---|
| | print >>sys.stderr, ("%-" + options.tabbing + "s %s") % (repr(e), repr(f)) |
---|
| | |
---|
| | |
---|
| | def xzip(l1, l2): |
---|
| | for x in range(max(len(l1), len(l2))): |
---|
| |
---|
| | |