summaryrefslogtreecommitdiff
path: root/test/LedgerHarness.py
diff options
context:
space:
mode:
authorDaniel Coonce <danielcoonce@gmail.com>2020-11-16 22:15:17 -0600
committerMartin Michlmayr <tbm@cyrius.com>2021-02-02 18:13:51 +0800
commitd8ed12f600bf9ca958cb9f285ceb10f5d8accbd3 (patch)
tree60bba3f9e22505c650a8cec6d85fa35277ade2b1 /test/LedgerHarness.py
parent8891e79de49e3b458ac7911f4dcddd676d4c95a5 (diff)
downloadfork-ledger-d8ed12f600bf9ca958cb9f285ceb10f5d8accbd3.tar.gz
fork-ledger-d8ed12f600bf9ca958cb9f285ceb10f5d8accbd3.tar.bz2
fork-ledger-d8ed12f600bf9ca958cb9f285ceb10f5d8accbd3.zip
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.
Diffstat (limited to 'test/LedgerHarness.py')
-rwxr-xr-xtest/LedgerHarness.py4
1 files changed, 2 insertions, 2 deletions
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):