From 08033e6d50dbe659b8393464eab119b00d8ba44a Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Sat, 13 Oct 2012 15:06:48 +0200 Subject: 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. --- test/RegressTests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/RegressTests.py') 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)) + -- cgit v1.2.3