diff options
author | Johann Klähn <kljohann@gmail.com> | 2012-10-13 15:06:48 +0200 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-10-18 13:45:40 -0700 |
commit | 08033e6d50dbe659b8393464eab119b00d8ba44a (patch) | |
tree | 7a50202d8fb7b2f02e8457ea9fffe624337536d3 /test/RegressTests.py | |
parent | 49b02614a39ad86bb499df8b410232a5948247d7 (diff) | |
download | fork-ledger-08033e6d50dbe659b8393464eab119b00d8ba44a.tar.gz fork-ledger-08033e6d50dbe659b8393464eab119b00d8ba44a.tar.bz2 fork-ledger-08033e6d50dbe659b8393464eab119b00d8ba44a.zip |
fix test runner if filename is specified
If the command line switch "-f" is used the test runner will
not pass the file name of the test file to ledger.
The line "test -f /dev/null" as used in test/baseline/cmd-convert.test
did not work as intended before this.
Also using "-f - " did not work as "$ledger" was noti
prepended to the command.
Diffstat (limited to 'test/RegressTests.py')
-rwxr-xr-x | test/RegressTests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/RegressTests.py b/test/RegressTests.py index 7d67eb21..1094d0d5 100755 --- a/test/RegressTests.py +++ b/test/RegressTests.py @@ -98,8 +98,10 @@ class RegressFile(object): def run_test(self, test): use_stdin = False - if test['command'].find("-f - ") != -1: - use_stdin = True + if test['command'].find("-f ") != -1: + test['command'] = '$ledger ' + test['command'] + if test['command'].find("-f - ") != -1: + use_stdin = True else: test['command'] = (('$ledger -f "%s" ' % os.path.abspath(self.filename)) + |