From bd2468c341fc0c58e51475e3e3c710f593a459c6 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 3 Jan 2013 13:02:34 +0100 Subject: [PATCH] Use program suffix to address lyx-executable, according to suffix of tex2lyx. Still the is error in tex2lyx, which searches for invalid suffix to find the correct lyx executable. --- src/tex2lyx/test/runtests.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tex2lyx/test/runtests.py b/src/tex2lyx/test/runtests.py index b1383cdbb3..39e91f1222 100755 --- a/src/tex2lyx/test/runtests.py +++ b/src/tex2lyx/test/runtests.py @@ -43,7 +43,12 @@ def main(argv): else: error(usage(argv[0])) - lyx = os.path.join(os.path.dirname(tex2lyx), "lyx") + suffixre = re.search(r'\d+\.\d+$', tex2lyx) + if suffixre: + suffix = suffixre.group() + else: + suffix = "" + lyx = os.path.join(os.path.dirname(tex2lyx), "lyx" + suffix) inputdir = os.path.dirname(argv[0]) if len(argv) >= 4+skipcount: outputdir = sys.argv[3+skipcount] @@ -103,7 +108,6 @@ def main(argv): # e.g. '#LyX file created ...' # '\lyxformat ...' if lines1[2:] != lines2[2:]: - sys.stdout.writelines("lines1 != lines2") diff = difflib.unified_diff(lines1, lines2, lyxfile1, lyxfile2, t1, t2) sys.stdout.writelines(diff) errors.append(f)