diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2014-12-03 22:14:49 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2014-12-03 22:14:49 +0100 |
commit | 936c3f0434c6a23286081aaced0738912135604f (patch) | |
tree | b125c47f884d1a4b0021e7df6f9d51702e253778 /test/DocTests.py | |
parent | f238d993fb28cc328b86f0f3dde60f4eb3065980 (diff) | |
download | fork-ledger-936c3f0434c6a23286081aaced0738912135604f.tar.gz fork-ledger-936c3f0434c6a23286081aaced0738912135604f.tar.bz2 fork-ledger-936c3f0434c6a23286081aaced0738912135604f.zip |
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.
Diffstat (limited to 'test/DocTests.py')
-rwxr-xr-x | test/DocTests.py | 5 |
1 files changed, 3 insertions, 2 deletions
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: |