From 936c3f0434c6a23286081aaced0738912135604f Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Wed, 3 Dec 2014 22:14:49 +0100 Subject: Fix DocTests running in non-standard width terminal The changes introduced with 56976a127c081a6a008c81966360003a8711a319 make --columns default to terminal width, as returned by ioctl() break the DocTests when run in a terminal with a width different from the standard of 80 columns. --- test/DocTests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/DocTests.py') diff --git a/test/DocTests.py b/test/DocTests.py index d2931686..be28fae1 100755 --- a/test/DocTests.py +++ b/test/DocTests.py @@ -114,8 +114,9 @@ class DocTests: if command[0] == '$': command.remove('$') index = command.index('ledger') command[index] = self.ledger - command.insert(index+1, '--init-file') - command.insert(index+2, '/dev/null') + for i,argument in enumerate('--init-file /dev/null --columns 80'.split()): + command.insert(index+i+1, argument) + try: findex = command.index('-f') except ValueError: -- cgit v1.2.3