mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-21 17:51:03 +00:00
Execute lyx2lyx unit test when running tests
Actually lyx2lyx has a tiny unit test. Add it to the autotools test machinery and fix it: Since nobody knew about it the test was of course broken.
This commit is contained in:
parent
55af9cb006
commit
11be833a2e
@ -59,6 +59,7 @@ keystest:
|
||||
alltests: check alltests-recursive
|
||||
|
||||
alltests-recursive:
|
||||
cd lib; $(MAKE) alltests-recursive
|
||||
cd src; $(MAKE) alltests-recursive
|
||||
|
||||
updatetests:
|
||||
|
@ -2219,3 +2219,9 @@ install-data-hook:
|
||||
for i in $(DESTDIR)$(scriptsdir)/*.py $(DESTDIR)$(scriptsdir)/listerrors ; do \
|
||||
$(CHMOD) 755 $$i; \
|
||||
done
|
||||
|
||||
alltests: check alltests-recursive
|
||||
|
||||
alltests-recursive:
|
||||
cd lyx2lyx; $(MAKE) alltests-recursive
|
||||
|
||||
|
@ -38,3 +38,14 @@ dist_lyx2lyx_PYTHON = \
|
||||
|
||||
install-data-hook:
|
||||
$(CHMOD) 755 $(DESTDIR)$(lyx2lyxdir)/lyx2lyx
|
||||
|
||||
alltests: check alltests-recursive
|
||||
|
||||
alltests-recursive:
|
||||
@$(PYTHON) "$(srcdir)/test_parser_tools.py"; \
|
||||
if test $$? -eq 0; then \
|
||||
echo -e "=====================\nlyx2lyx tests passed.\n====================="; \
|
||||
else \
|
||||
echo -e "=====================\nlyx2lyx tests failed.\n====================="; \
|
||||
fi
|
||||
|
||||
|
@ -78,8 +78,8 @@ class TestParserTools(unittest.TestCase):
|
||||
def test_find_token(self):
|
||||
self.assertEquals(find_token(lines, '\\emph', 0), 7)
|
||||
self.assertEquals(find_token(lines, '\\emph', 0, 5), -1)
|
||||
self.assertEquals(find_token(lines, '\\emp', 0, exact = True), -1)
|
||||
self.assertEquals(find_token(lines, '\\emp', 0, exact = False), 7)
|
||||
self.assertEquals(find_token(lines, '\\emp', 0, 0, True), -1)
|
||||
self.assertEquals(find_token(lines, '\\emp', 0, 0, False), 7)
|
||||
self.assertEquals(find_token(lines, 'emph', 0), -1)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user