From d8ed12f600bf9ca958cb9f285ceb10f5d8accbd3 Mon Sep 17 00:00:00 2001 From: Daniel Coonce Date: Mon, 16 Nov 2020 22:15:17 -0600 Subject: Make test harness more Windows compatible Windows doesn't seem to use UTF-8 by default, so we can specify encoding='utf-8'. Also, backslashes are confusing to regex parsers. --- test/LedgerHarness.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/LedgerHarness.py') diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py index 2373ea32..0b4f174d 100755 --- a/test/LedgerHarness.py +++ b/test/LedgerHarness.py @@ -82,8 +82,8 @@ class LedgerHarness: if columns: insert += ' --columns=80' - command = re.sub('\$ledger', '%s%s %s' % \ - (self.ledger, insert, '--args-only'), command) + command = command.replace('$ledger', '"%s"%s %s' % \ + (self.ledger, insert, '--args-only')) valgrind = '/usr/bin/valgrind' if not os.path.isfile(valgrind): -- cgit v1.2.3