2 # -*- coding: utf-8 -*-
4 # file src/tex2lyx/test/runtests.py
5 # This file is part of LyX, the document processor.
6 # Licence details can be found in the file COPYING.
10 # Full author contact details are available in file CREDITS
12 # This script reads a unicode symbol file and completes it in the given range
14 import os, string, sys
18 return "Usage: %s [<tex2lyx binary> [<script dir>]]" % prog_name
22 # Parse and manipulate the command line arguments.
24 sys.path.append(os.path.join(sys.argv[2]))
26 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '../../../lib/scripts'))
28 from lyxpreview_tools import error
37 basedir = os.path.dirname(argv[0])
39 files = ['test.ltx', 'test-structure.tex', 'test-insets.tex', \
40 'box-color-size-space-align.tex', 'CJK.tex', \
41 'XeTeX-polyglossia.tex']
45 texfile = os.path.join(os.path.dirname(argv[0]), f)
46 cmd = '%s -roundtrip -f %s' % (tex2lyx, texfile)
47 if os.system(cmd) != 0:
51 error('Converting the following files failed: %s' % ', '.join(errors))
53 if __name__ == "__main__":