From 7f2bb46407e0d59e3b21118ea229c645478951a1 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 16 Jun 2020 15:48:01 +0100 Subject: [PATCH] explitictly split PDF2HTMLEX_PATH in test.py.in to allow for arguments in path --- pdf2htmlEX/test/test.py.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pdf2htmlEX/test/test.py.in b/pdf2htmlEX/test/test.py.in index 8748d64..5eab842 100755 --- a/pdf2htmlEX/test/test.py.in +++ b/pdf2htmlEX/test/test.py.in @@ -63,10 +63,14 @@ class Common(object): shutil.rmtree(self.TMPDIR, ignore_errors=False, onerror=None) os.mkdir(self.TMPDIR) - args = [Common.PDF2HTMLEX_PATH, - '--data-dir', self.DATDIR, + # To allow the user to specify additional command line arguments + # in the path, we split the PATH on whitespace and then append our + # arguments. + # + args = Common.PDF2HTMLEX_PATH.split() + + [ '--data-dir', self.DATDIR, '--dest-dir', self.TMPDIR - ] + args + ] + args with open(os.devnull, 'w') as fnull: return_code = subprocess.call(list(map(str, args)), stderr=fnull)