Merge pull request #337 from afh/pull/DocTest

Fix DocTests running in non-standard width terminal
This commit is contained in:
Martin Michlmayr 2014-12-03 17:20:00 -05:00
commit a65815607f

View file

@ -114,8 +114,9 @@ class DocTests:
if command[0] == '$': command.remove('$') if command[0] == '$': command.remove('$')
index = command.index('ledger') index = command.index('ledger')
command[index] = self.ledger command[index] = self.ledger
command.insert(index+1, '--init-file') for i,argument in enumerate('--init-file /dev/null --columns 80'.split()):
command.insert(index+2, '/dev/null') command.insert(index+i+1, argument)
try: try:
findex = command.index('-f') findex = command.index('-f')
except ValueError: except ValueError: