Commit Graph

280 Commits

Author SHA1 Message Date
Scott Kostyshak
78b7045ed8 CMake: full path of an include needed for ver <3.0 2014-06-21 20:43:06 -04:00
Kornel Benko
7bc0a6f388 Cmake tests: Optimizing the cmake configuration time
The configuration time suffers mostly on checking, which of the export tests
is to be reverted.
1.) There is a new configuration flag now, "LYX_ENABLE_EXOPRT_TESTS.
   If not set (default) no export tests are created.
2.) If set, then the optimization halves the time needed for creation of tests.

The effect on my side:
        a.) Until now the time was:        ~ 26 seconds
        b.) The optimized time is now:     ~ 16 seconds
        c.) With not enabled export tests: ~  5 seconds
2014-06-21 21:15:54 +02:00
Kornel Benko
c9a6939ebb ctests: Use regular expressions 2014-06-19 21:04:18 +02:00
Scott Kostyshak
e11ae599ea Update ctests to reflect inputenc changes
There were changes to inputenc and luainputenc that are now
released in Tex Live 2014 that affect several exports. Some
exports that produced good PDFs now fail. Others that produced
incorrect PDFs (with gibberish) now correctly fail. Several
IEEEtran-* exports failed before and now export correct PDFs.

For more information, see

  http://tug.org/pipermail/tex-live/2014-May/035338.html
  https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184435.html
2014-06-19 10:26:15 -04:00
Scott Kostyshak
7ae0700c7e Fix a comment 2014-06-19 10:26:01 -04:00
Kornel Benko
1b3e4c73f8 Cmake tests: Added parser_tools test to the lyx2lyx group tests 2014-06-12 09:07:57 +02:00
Kornel Benko
046001e571 Make: improve detection of X11 with Qt 5
In collaboration with Scott Kostyshak:
With Qt 4 we could use Q_WS_X11, defined by FindQt4.cmake. In Qt 5,
there is no FindQt5.cmake. Instead we now define our own variable,
QT_USES_X11 by using class QX11Info available only on X11.
(http://qt-project.org/doc/qt-5/QX11Info.html)

The main consequence of this improved support is that now the keytests
can be run (ctest -R "keytest") when LyX is compiled with Qt 5.
Before, with Qt 5 we did not know if X11 was available, which is
needed by xvkbd, so the tests were not enabled. Note, however, that
many tests fail with Qt version 5.2.1 because there was a change in
the event handling mechanism in Qt that causes xvkbd to be unable to
pass capital letters (so case sensitive greps in the tests fail). This
needs to be investigated and reported.
2014-05-25 13:50:18 +02:00
Kornel Benko
b178770ce3 Cmake export tests: Parse also for nameless layouts in lyx-files 2014-05-23 11:32:19 +02:00
Scott Kostyshak
f4adfca65a ctests: reinvert a test
This test was inverted before but got lost
in the transition to regular expressions.
2014-05-10 22:29:38 -04:00
Kornel Benko
2cab2c9f72 Cmake tests: Added more regular expressions 2 2014-04-25 13:53:29 +02:00
Scott Kostyshak
f887efedf1 ctests: regex to revert two instant_preview tests
These effectively revert the following:

    export/examples/instant_preview_dvi3_systemF
    export/examples/instant_preview_pdf2
2014-04-24 10:00:36 -04:00
Kornel Benko
970d31b044 Cmake tests: Added more regular expressions 2014-04-23 13:04:37 +02:00
Kornel Benko
ae33fa9e39 Cmake tests: simplify part of the set of reverted tests using regex 2014-04-21 19:20:40 +02:00
Kornel Benko
dae08c371f Cmake tests: Allow regular expressions to select for reverted tests. 2014-04-21 19:18:42 +02:00
Scott Kostyshak
06f12532d1 Invert new tests failing outside of default format
These started failing after we implemented tests for formats
that are in the complement set to the default format (7ecbb068).
It might be worth it in the future to take a look at each individually
and see whether they are supposed to fail or if there is something LyX
can do to add support for exporting them.
2014-04-21 02:58:11 -04:00
Scott Kostyshak
55b3341fba Fix the ignored path of the JASA files
This follows a860d18b which moved the JASA file back from
being an example to a template.
2014-04-21 02:57:45 -04:00
Kornel Benko
7ecbb06888 cmake export tests.
Define new policy of what export formats to check.
Depending on default_output_format
default or unset           xhtml, dvi*, pdf*
xhtml                      xhtml
any of pfd variants        xhtml, pdf*
any of dvi variants        xhtml, dvi*
each other (like eps3)     as specified
2014-03-16 09:57:31 +01:00
Kornel Benko
59f4d0d753 ctest export: smal improvements
1.) Use of regex to ignore group of tests
2.) If default output format is pdf2(pdflatex), the try to check also
  for xelatex and lualatex
2014-03-12 17:15:07 +01:00
Kornel Benko
aea5e80f45 Typo 2014-03-10 13:39:31 +01:00
Kornel Benko
39c79a72be ctests: pdf export for korean documents
Use Nanum-font for tests to get a readable pdf with luatatex/xelatex
2014-03-10 13:33:46 +01:00
Kornel Benko
2127cde4ee Export test for french EmbeddedObjects with dvi3 and system fonts working now 2014-02-27 08:55:38 +01:00
Scott Kostyshak
7409b5e18a Fix a broken autotest
This test was broken after wrap-around search was implemented. From
what I understand, the point of the test is that search should _not_
match in this case because "ignore format" is checked by default.
Thus, a new way of testing that there was no match is to check whether
the wrap around message shows up, because the cursor is initially at
the beginning so that would mean that the entire buffer was checked.

I confirmed that the test now works by checking that it passes and
checking that it fails if "ignore format" is unchecked. Although this
test is still fragile, it is fragile in a conservative way (i.e. it
will give false failures rather than false passes). It will fail if
the Italian translation changes, if "ignore format" is unchecked by
default, or if the wrap-around mechanism changes (e.g. does not ask if
the cursor started at the beginning of the buffer).
2014-02-24 08:10:34 -05:00
Kornel Benko
f36ea42b5e Cmake build: Prepare lyx2lyx tests to use the python executable found at configure time 2014-01-31 19:10:23 +01:00
Kornel Benko
83071a2392 Ctests perl scripts: Added use of prototypes 2014-01-10 12:34:40 +01:00
Kornel Benko
10ffbd787a Cmake build: White space + simplification 2014-01-05 10:02:29 +01:00
Kornel Benko
90cb7c1492 Cmake tests for check load of lyx-files
Do not interpret reconfigure output of lyx as test-error.
2013-12-26 10:29:34 +01:00
Scott Kostyshak
6f41779f5d JASATeX: add note that it fails with system fonts
The JASATeX class is currently unmaintained. Also, this
commit moves the system font tests from inverted to ignored
(otherwise lualatex and xelatex run in infinite loops).
2013-12-25 23:28:48 -05:00
Scott Kostyshak
149cc66e69 ctests: invert the ctex TeX font test
They are not supposed to work yet.
2013-12-25 23:28:48 -05:00
Scott Kostyshak
df77b2db0e ctests: invert tests that are expected to fail
For many of these XeTeX or LuaTeX does not yet support
using TeX fonts for certain languages. The others fail
because, as Jürgen explains, they have excessive preamble
code that is only targeted at (pdf)latex.
2013-12-17 01:52:22 -05:00
Kornel Benko
997035fe66 Cmake tests: Expand export tests for luatex and xetex
Citing Scott:
In our current set up, we are currently testing XeTeX and LuaTeX
either with system fonts or with TeX fonts but never both. We should
test with both in my opinion. We will have to ignore/invert many tests
but it still seems useful. For example Günter fixed babel-greek so
that it works now with TeX fonts; and Jürgen found some errors in LyX
that were causing some of the English docs to fail with system fonts.
Currently we only test greek documents with system fonts and we only
test English documents with TeX fonts.

This change adds the missing test-cases.
2013-12-16 11:36:36 +01:00
Scott Kostyshak
e27ba681ac ctests: use Chinese roman font for zh docs 2013-12-12 23:44:41 -05:00
Scott Kostyshak
1bbf126b94 ctests: non-TeX Ukrainian+LuaTeX is not supported
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181690.html

Thanks to Günter Milde for the advice.
2013-12-12 23:44:39 -05:00
Scott Kostyshak
a3f0ed3bc4 ctests: LuaTeX does not support Farsi yet
See (thanks to Uwe for the link):
ccb0e9e2c6

We thus invert the LuaTeX Farsi tests.

All inverted tests now have explanations for why they are not
currently expected to work.
2013-12-07 12:25:51 -05:00
Scott Kostyshak
09a5d195dc ctests: babel-greek was fixed
We can now test for regressions in the Greek docs for
XeTeX and LuaTeX export with FreeSans.

(Also some Indonesian tests were missing from revertedTests.)
2013-12-07 12:17:52 -05:00
Kornel Benko
9422053f49 Cmake test environment.
Expanded search for an image to \ecvpicture{} in the preamble.
2013-12-07 13:06:27 +01:00
Scott Kostyshak
8a4c9b60e2 ctests: invert ectaart tests
As Kornel has explained:

There is an incompatibility between luainputenc.sty and ectaart.cls.
luainputenc.sty loads luatex.sty. Both files (luatex.sty and
ectaart.cls) define the latex-command \setattribute.

These tests should be inverted because the conflict may one day be
resolved at which point we can begin testing for regressions.

(This commit also rearranges the europeCV lines to below the
corresponding explanation comment.)
2013-12-07 01:56:00 -05:00
Scott Kostyshak
033b49df13 Add note to es/europeCV.lyx and invert Xe and Lua
Export with XeTeX and LuaTeX (with either non-tex fonts or 8-bit
compatibility mode) does not work because the loading of inputenc with
utf8x is hardcoded in europecv.cls at this time.

This commit adds a note to es/europeCV.lyx explaining the problem and
inverts the XeTeX and LuaTeX tests.

See
http://comments.gmane.org/gmane.editors.lyx.devel/145896

Thanks to Günter Milde for the advice and to Ignacio García
for the translation of the note.
2013-12-06 12:13:14 -05:00
Kornel Benko
b1862cda44 Cmake test environment.
Expanded search for an image to "layout Photo".
2013-12-06 10:42:26 +01:00
Scott Kostyshak
fb034884ac Fix noweb2lyx, Literate, and listerrors examples
This is a manual lyx2lyx fix. Some of the problematic chunks
are not correctly converted with lyx2lyx so this commit manually
converts them to ERT.

For more details, see:
  http://marc.info/?t=137702744100010&r=1&w=2
2013-12-03 02:18:07 -05:00
Scott Kostyshak
8da5bccb6d ctests: ignore latex8 tests
latex8.sty is obsolete and replaced by IEEEconf.

(consistent with a6372da7)
2013-12-03 02:15:37 -05:00
Scott Kostyshak
cc89ef1c1b ctests: invert Hungarian LuaTeX tests
Similar to Indonesian LuaTeX support (see 7d705438),
"magyar" is not supported. After 2.1 is released,
the babel name of "magyar" should be changed to
"hungarian" (if others disagree then these tests
still should stay inverted).
2013-12-03 02:15:36 -05:00
Scott Kostyshak
7d70543809 ctests: invert Indonesian LuaTeX tests
The babel name of Indonesian should be changed from "bahasa"
to "indonesian". This should be done after 2.1 is released so as
to minimize potential problems such as Jürgen's example of
\addto\captionsbahasa{\renewcommand\chaptername{Foo}}

For more info, see:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181595.html
2013-11-29 03:10:35 -05:00
Scott Kostyshak
b9a3e2e9ce ctests: invert Greek LuaTeX tests
From Jürgen:

  LuaTeX support in polyglossia is still very new and experimental.
  I have this enhancement on the agenda for 2.2, but not for 2.1.

For more details, see:
http://marc.info/?l=lyx-devel&m=138506346715339&w=2
2013-11-28 16:28:38 -05:00
Scott Kostyshak
a43a3e31d1 ctests: invert Hebrew LuaTeX tests 2013-11-28 02:56:47 -05:00
Scott Kostyshak
0a4bb51a26 ctests: add dviluatex as a format that needs fonts
Documents in certain languages will only work with dviluatex
if fonts that support those languages are used.

This commit continues e690cfc4.
2013-11-27 07:57:31 -05:00
Kornel Benko
5f7102d2bc Cmake test build (perl): Use File::Spec->rel2abs instead of abs_path()
Problem arises on fresh build, where the destination file is not yet defined.
In that case Cwd::abs_path() returns empty string, which fatal later on.
2013-11-18 12:25:18 +01:00
Kornel Benko
e690cfc47c make test environment. Exports with luatex and xetex.
In successful cooperation with Scott Kostyshak.
We provide many lyx-documents which are not compilable with luatex or xetex.
But some of them compile, if we change the font use to non_tex_fonts.
Since this would change the appropriate source, we have to convert
it first into a save location. To make it there compilable,
we have to convert also all file references.
languages     used font
he|el|ru|uk  'FreeSans'
fa           'FreeFarsi'
zh_CN        'WenQuanYi Micro Hei'
The whole job is done with a perl script.
2013-11-17 23:17:27 +01:00
Scott Kostyshak
00fb0a3e10 ctests: invert tests failing because of #8823 2013-11-14 01:48:08 -05:00
Tommaso Cucinotta
36b6296791 Fixing previous mess with git stash (apologies). 2013-11-13 20:07:53 +00:00
Tommaso Cucinotta
a2291edac6 Now run-tests.sh captures PROGRAM_SUFFIX from config.h, in order to use the correct .lyx folder name. 2013-11-13 02:41:38 +00:00
Tommaso Cucinotta
777156e0ff Added self-sanity-check for presence of pcregrep, otherwise many (almost all) tests will fail. 2013-11-13 02:13:32 +00:00
Scott Kostyshak
1e807d5183 Add XeTeX tests
Testing with XeTeX uncovered a few bugs (e.g. Math export
was failing) and thus should be a part of the ctesting.
2013-10-09 11:31:40 -04:00
Vincent van Ravesteijn
7583a8ce25 Fix EOLs 2013-10-06 05:57:53 +02:00
Scott Kostyshak
a6372da715 Ignore latex8 PDF export tests
latex8.sty is obsolete and replaced by IEEEconf.
2013-10-01 17:30:37 -04:00
Kornel Benko
f2553ebf6c Cmake build tests: Threadsafety and test-labeling
The tests are now more robust if ctest uses '-j' (number of threads) parameter.
a.) keytests are running in sequence and in one thread only, no other thread running
b.) tex2lyx tests are locking in respect to each other
c.) Test gets one or more labels, so that we can select
        ctest -L url
  to run tests labeled url
d.) New macro settestlabel() to add labels to a test
2013-09-07 09:25:02 +02:00
Scott Kostyshak
dbd3e5a0f8 Remove diagnostic code that slipped in
I did not intend to commit this piece of diagnostic code
in a0f6b09a.
2013-09-06 22:22:23 -04:00
Kornel Benko
b94d0e35d3 Replaced some invalid urls 2013-08-28 16:50:23 +02:00
Kornel Benko
1a1ee97758 Cmake build tests: Create directory neede for testing
While testing exports, we need a directory for created mess,
which we use then as working directory.
2013-08-26 22:02:20 +02:00
Kornel Benko
acdfceac71 Cmake build tests: update comments
ignoredTests: add comment
expectedTestFailures: update the set of bad tests
2013-08-25 18:18:19 +02:00
Kornel Benko
788e2b1ac8 Cmake build tests: Unify use of userdir
While some test runns lyx-exe, we need userdir be
different from default. All relevant tests should use the same directory.
2013-08-25 11:41:10 +02:00
Scott Kostyshak
889182eb1a ctests: ignore check_load/templates/attic/latex8
latex8.sty is obsolete and replaced by IEEEconf.
2013-08-23 15:34:31 -04:00
Scott Kostyshak
a0f6b09a82 ctests: macro now deals with reverted and ignored
A single macro determines if a test should be ignored
(by returning an empty test name), and if not,
whether to revert it.

This was Kornel's idea.
2013-08-23 14:45:54 -04:00
Kornel Benko
036a78e990 Cmake tests: Allow for comments in control files
Files, which contain names of ctest-tests controling
whether they should be inverted, or ignored.
We have two such files ATM: revertedTests + ignoredTests
2013-08-23 20:25:24 +02:00
Scott Kostyshak
7affdd5764 New ctests to check for parsing and other errors
These tests load the .lyx files to see if there are
any parsing errors or other LyX errors/warnings. The
tests fail if LyX writes a line to STDERR that does not
match any of the regexes stored in filterCheckWarnings.

Thanks to Kornel for the CMake expertise and corrections.
This patch was written jointly with him.
2013-08-22 19:01:23 -04:00
Kornel Benko
48e8f93d9a Cmake build tests: be more verbose in displaying running commands 2013-08-23 00:50:42 +02:00
Kornel Benko
f416d9156e Cmake build tests: make lyx2lyx tests threadsafe 2013-08-23 00:48:58 +02:00
Kornel Benko
fc33092fd8 Cmake build: modify some tests
a) test export/templates/ectaart_pdf5 removed, because
    of incompatibility between ectart.cls and luatex.sty
b) renamed some tests to reflect their purpose
    tex2lyx2lyx/roundtrip/ => tex2lyx/cmplyx/
          # the tests are comparing files written by lyx (not by tex2lyx)
    autotests/ => keytest/
          # we are testing reactions of lyx to some key strokes
c) add tests for lyx2lyx. This is rather rudimental, in that it only
    checks for created output, error codes and error output.
d) use correct environment variable to set up the userdir for testing
2013-08-21 13:34:26 +02:00
Kornel Benko
66f1991b24 The cmake-test 'export/examples/sterrors_pdf' is now expected to pass
iff 'noweb.sty' is installed.
2013-08-16 18:23:46 +02:00
Kornel Benko
7e89a2d5b1 Make more tests compilable
revertedTestst: aa_samply.lyx compiles without change
*_Additional.lyx: bad include path after moved to attic
2013-08-14 14:24:20 +02:00
Scott Kostyshak
1d3e77b515 tests: 'default' 'default_output_format' if none
When deciding which output formats to test, if we do not find a
'default_output_format' we assume it is set to 'default'.

For discussion, see:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg180536.html
2013-08-05 19:24:11 -04:00
Scott Kostyshak
1052732e66 Japanese docs: translations from Koji 2013-08-05 19:15:56 -04:00
Scott Kostyshak
005cc9097c revertedTests: take out some Hebrew, add Russian
The Hebrew files export fine with pdf and pdf2 when Hebrew fonts
are installed. Russian LuaTeX is not known to work.
2013-08-05 04:58:55 -04:00
Vincent van Ravesteijn
9235e82558 Fix typo 2013-08-04 16:37:24 +02:00
Kornel Benko
8ac070afb0 Cmake export tests
Some export test are known to fail. Checking them every time is cumbersome.
Now, the tests marked in file revertedTests will invert the success condition
and mark the test as INVERTED_SEE-README.ctest.

If some of the tests in revertedTests fails, this is good, and the testname
can be removed from it.
2013-08-04 14:31:47 +02:00
Kornel Benko
db3afda749 typo 2013-07-23 22:39:03 +02:00
Kornel Benko
33f23ae8e5 Export tests in cmake build: Do not use the default userdir while
running lyx.
2013-07-23 21:42:44 +02:00
Vincent van Ravesteijn
f43e38fa9f CMake: xvkbd: Check whether the list exists
Instead of adding an empty element to the list, just check properly whether the list exists.
2013-07-23 20:42:53 +02:00
Vincent van Ravesteijn
d3634b6cd5 CMake: xvkbd: Fix spelling 2013-07-23 19:05:06 +02:00
Vincent van Ravesteijn
33aef1befe CMake: xvkbd: Compile fix if none of the libraries is found
If no libraries are found, XVFBDLIBS is not initialized and the command "list(REMOVE_DUPLICATES XVFBDLIBS)" fails. So, initialize XVFBDLIBS beforehand.
2013-07-23 19:04:56 +02:00
Tommaso Cucinotta
cf973b2f3a I seem to need this to let the 'Lang' keyword work, within *-in.txt files. 2013-07-23 02:10:48 +01:00
Kornel Benko
f4bc391925 Cmake build xvkbd: add xmu to the list of libraries to bind with.
This is needed (because of DSO) on ubuntu 13.04.
2013-07-13 22:45:05 +02:00
Kornel Benko
5431b41d22 Cmake build key tests: Omit the tests and creation of xvkbd command,
if not all needed libs or programs are available.
This error is now not fatal.
2013-07-13 22:44:56 +02:00
Kornel Benko
fda7721e4a Cmake tests: use multiple log files for multiple test-cases 2013-05-21 19:54:20 +02:00
Kornel Benko
82bca55a1f Typo 2013-05-21 13:26:26 +02:00
Scott Kostyshak
060bac3401 Add autotests for #8684
(these should currently fail)
2013-05-20 18:52:16 -04:00
Tommaso Cucinotta
712e1871ca Added regression test for simple use-case documented in Advanced F&R manual.
findadv-re-05 with ignore format fails, whilst findadv-re-06 not ignoring format succeeds, as of now.
2013-04-29 00:48:43 +01:00
Scott Kostyshak
60ed90f0ae Add another test for #7673 (currently fails) 2013-04-04 06:58:42 -04:00
Scott Kostyshak
36da271b74 Add test for #8370 (not yet fixed) 2013-04-04 06:31:00 -04:00
Scott Kostyshak
9ff4dc4258 Clean up CMake testing code
Thanks to Kornel for the advice.
2013-03-04 11:39:12 -05:00
Scott Kostyshak
e4a72659b0 Re-add MergedManual test
Now that the default format is set to xhtml, there will correctly
be no LaTeX test.
2013-03-04 07:18:11 -05:00
Scott Kostyshak
cc30e79c32 Tests: take into account a default format of xhtml
The xhtml format is always tested, regardless of the default format.
Without this, if the default format is xhtml, CMake gives an error
when trying to add the xhtml test because it was already added.
2013-03-04 07:15:52 -05:00
Kornel Benko
f520df382d Remove MergedManuals.lyx from export tests 2013-03-01 17:13:29 +01:00
Scott Kostyshak
6c15b944b1 Remove keytest.py code from export.cmake
Export tests do not need keytest.py.
2013-03-01 07:15:37 -05:00
Scott Kostyshak
28104a7496 Add templates to export tests (CMake & autotools) 2013-02-21 08:25:13 -05:00
Kornel Benko
9183c922ea Sort export tests in cmake build according to language 2013-02-20 13:26:01 +01:00
Kornel Benko
248c6ded33 Cmake tests: Add lyx-files for export testing recursively. 2013-02-18 16:34:19 +01:00
Scott Kostyshak
9f4927e855 Add examples to export tests (CMake & autotools)
Now all export tests can be run with:
ctest -R "export"

Only export tests for manuals can be run with:
ctest -R "export/doc"

And only export tests for examples can be run with:
ctest -R "export/examples"
2013-02-16 06:27:09 -05:00
Scott Kostyshak
2fd0c34b9b CMake: change name of export autotests
Instead of 'autotests/export/doc/' export tests are prefixed
with 'export/doc/'. This has the advantage of the name better
reflecting the test (export tests are not autotests), but has a
disadvantage in that the old name gave a better idea of where the
export test scripts are located (in the autotests directory).
2013-02-16 06:27:09 -05:00
Scott Kostyshak
010dfb6a5a Make export tests more extendable
For both CMake and autotools. Now we can easily add
the examples to the export tests.
2013-02-16 06:27:09 -05:00
Scott Kostyshak
39c380ee0b Add an autotest for #8540
This test should currently fail on master and on 2.0.x.
2013-02-07 03:42:14 -05:00
Scott Kostyshak
e609787a0f keytest.py: do not print the same thing twice
keytest.py now only prints one time the command that it is executing for
an assert. The command is already printed in the function responsible
for executing it, so it is not necessary to print the command before
calling that function.
2013-02-04 03:20:02 -05:00
Scott Kostyshak
2aeb17e8ef Add an autotest for #7673
This test should fail because #7673 is not yet fixed in trunk.
Note that it is fixed in branch.

This is the first autotest that uses an existing .lyx file,
bug-7673.lyx.
2013-01-29 16:18:08 -05:00
Scott Kostyshak
12a4b3aee9 autotests: clean up .emergency file of input .lyx
If the test opens an existing .lyx file and crashes, it will leave
around a .emergency file. If a test with that same name is run again,
LyX will try to recover the .emergency file, which could throw
off the test.

This is implemented for both CMake and autotools.
2013-01-29 16:18:08 -05:00
Scott Kostyshak
e77c0dfcf3 CMake: tests can now use an existing .lyx file
To reproduce some bugs, tests need to open an existing LyX file. This
is now possible with CMake and is consistent with testing under
autotools in the sense that the .lyx file is referred to in the test
by being in the parent directory.

If the test is named bug-XXXX-in.txt and there exists a file
bug-XXXX.lyx, that file will be copied to the parent directory of
out-home in the build directory.
2013-01-27 05:29:50 -05:00
Kornel Benko
e6e28f189a Cmake build: autotests: Remove "session"-file before starting tests 2013-01-25 10:47:31 +01:00
Kornel Benko
dae22baf0b Cmake build: Forgot to set the environment XVKBD_HACKED
to select the correct parameters for xvkbd.
2013-01-25 09:16:34 +01:00
Kornel Benko
55d32635e1 Cmake build: Add pdf, pdf2 and pdf5 formats to export testcases 2013-01-24 17:58:44 +01:00
Kornel Benko
aba79b78c7 Add description of Sleep (== pause) command in keutests 2013-01-24 08:48:18 +01:00
Scott Kostyshak
d31aef689a CMake export tests now correctly check return code 2013-01-22 03:10:48 -05:00
Scott Kostyshak
2f14b329b3 Add an autotest for a trunk regression (#8482)
The regression was fixed at [f164ffd0/lyxgit].
2013-01-05 04:44:14 -05:00
Scott Kostyshak
3c9686ee35 Shave 3 seconds off an autotest
'-dbg any' is not needed.
2013-01-05 04:39:49 -05:00
Kornel Benko
9481d4182e autotests: Enable the suffixed lyx to run the test too.
(Hard coded 'lyx' replaced with real lyx-exe-file-name)
2013-01-05 10:07:37 +01:00
Vincent van Ravesteijn
1b3871b302 Add custom target to run tests
This target can depend on the individual test projects and this makes sure
that the test projects are build before running the tests.
2012-12-17 22:26:14 +01:00
Tommaso Cucinotta
073561ca63 Allow for keeping succesful tests output directories if the V env variable is non-null. 2012-12-15 12:07:31 +00:00
Kornel Benko
0b82548b5e Cmake build autotests:
Correct the environment MAX_LOOP -> MAX_LOOPS
2012-12-15 12:58:31 +01:00
Kornel Benko
892e237fe1 Cmake build: Testing
Make this all more the cmake way
2012-12-15 00:15:59 +01:00
Kornel Benko
81500fc99b Cmake build:
Move definitions of target ${_lyx} and ${_tex2lyx} to top-most directory,
to make them overall available
2012-12-14 12:23:17 +01:00
Kornel Benko
96dd1363a2 Cmake build: all tests
1.) Rename tests to show their grouping
2.) Adapt the roundtrip tests to new lyx-format
2012-12-13 15:35:04 +01:00
Kornel Benko
1f93b0805e Cmake build autotests:
Split export test to test on each format and each input file
One can still check all exports with one commend
        ctest -R "export.*"
2012-12-13 12:38:38 +01:00
Tommaso Cucinotta
610145bb5a Fixed wmctrl invocation copying keytest.pl behavior. 2012-12-12 19:23:05 +00:00
Kornel Benko
4182205ca8 Cmake build: autotests
Make the export test available to all, since it is independent of X11
2012-12-12 18:23:25 +01:00
Kornel Benko
b436a03b34 Cmake build: autotests
Adapt to use local .gmo files
2012-12-12 14:54:38 +01:00
Kornel Benko
57ca9ee073 Cmake build: autotests
1.) Filenames for export changed
2.) Usage of wmctrl
3.) More temporary file to remove
2012-12-11 18:59:05 +01:00
Kornel Benko
f02f671dd0 Cmake build, autotests
Removed if no X11.
Because X11 is needed for xvkbd but not available on some platforms (even if UNIX)
2012-12-11 16:00:59 +01:00
Kornel Benko
57b04ac7f4 Cmake build: First try to use autotests.
Many test are not running, but if changed the '-dbg xxx' to '-dbg any'
then all of sudden they pass ...
(The buffered output of lyx is often disrupted too early with 'kill -9',
so the expected data are not available for the appropriate test)
2012-12-11 15:17:04 +01:00
Tommaso Cucinotta
aad1f4ce78 Fixing behavior of Lang directive in test cases, by setting LANGUAGE variable, in addition to LANG one. 2012-12-09 20:38:53 +00:00
Tommaso Cucinotta
0e81930597 Fixed bug in escape sequence, showing up with ignore format off (addressing #8380). 2012-10-22 01:05:29 +01:00
Tommaso Cucinotta
5c6f72b96e Advanced find autotests now working again.
Make autotests work again on Ubuntu 12.04 (when launched from English language).
Add extra check and notification if wmctrl is missing.
2012-10-13 00:47:06 +01:00
Tommaso Cucinotta
ef7a142f3f Fixed longstanding bug in Advanced Find&Replace, when dealing with documents containing braces.
Corresponding test-case needed a fix as well and now it is passed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39518 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-25 19:16:14 +00:00
Tommaso Cucinotta
4622b215ba Added to the test-case the case that was actually failing (replacing with multi-cells inside math).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39280 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-12 15:55:32 +00:00
Tommaso Cucinotta
e87e2860e7 Added regression test for #7675 (ensure that after replacing multi-cell math contents the cursor is properly advanced).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39279 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-12 15:42:20 +00:00
Tommaso Cucinotta
db592baf0e Recovered autotests for *-in.txt tests.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39265 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-10 00:13:12 +00:00
Tommaso Cucinotta
bf5f1eb3e8 Added the possibility to build arbitrary scripts (*-in.sh) as tests. They are all launched
together with the others when typing 'make', and also they can be selectively
launched by using: ./run-tests.sh filename-in.sh.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39241 a592a061-630c-0410-9148-cb99ea01b6c8
2011-07-03 17:00:18 +00:00
Tommaso Cucinotta
a48baee56f Now Adv. F&R correctly interprets escape sequences within regexp insets, e.g., \\ or \(, for finding characters with a special meaning in regular expression context (\^()[]).
Added corresponding regression tests findadv-re-01 and -02 for finding these special characters.
Unfortunately, braces {} are a little bit special and don't work yet. Added findadv-re-03 regression test to not forget about this case.
This goes along the line of fixing issues reported by Andrew Parsloe and summarised as #7638.
Last note: Still there will be cases when the Advanced F&R won't work, especially if the text to be found and/or the search pattern is preceded by backslashes or others.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39135 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-19 16:41:23 +00:00
Tommaso Cucinotta
e607cbfbca Updated UserGuide after removal of macro insertion while in regexp mode.
Fixed regression case (now typing twice "\" leads to "\\", i.e., the regexp matching the backslash char).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39019 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-12 01:25:26 +00:00
Tommaso Cucinotta
3a603d760a Added test-case for regular expressions using "\" for backwards references (e.g., \1).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39018 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-12 01:23:07 +00:00
Tommaso Cucinotta
c7e609135a Now backslash-prefixed regexps like "\s", "\d", etc., are all understood by Advanced F&R.
Fixing issue 4 reported at: http://permalink.gmane.org/gmane.editors.lyx.devel/136992


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39016 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-12 00:12:26 +00:00
Tommaso Cucinotta
69ab1306a8 Avoid extra ' ' in text-only export of consecutive macros in math mode, for Advanced F&R matching, with ignore-format off.
For example, this wasn't allowing to match '\beta\alpha' in the sequence '\alpha\beta\alpha', as
in the accompanying regression test-case (added case for ignore-format off).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38888 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-29 14:08:29 +00:00
Tommaso Cucinotta
2d8108cf4c Avoid extra ' ' in text-only export of consecutive macros in math mode, for Advanced F&R matching.
For example, this wasn't allowing to match '\beta\alpha' in the sequence '\alpha\beta\alpha', as
in the accompanying regression test-case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38883 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-29 13:40:34 +00:00
Tommaso Cucinotta
ec46b98d8c Fixed bug in matching at borders within *-environments with ignore-format off.
(related to #7596)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38863 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-27 21:14:36 +00:00
Tommaso Cucinotta
386c8291ed Fixed Advanced F&R issue in matching things at environment borders with ignore-format off.
Added accompanying regression tests for displayed math and numbered equations.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38860 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-27 20:39:58 +00:00
Tommaso Cucinotta
f1965e9ff1 Bugfix in how the search buffer was exported for the Advanced Find & Replace.
For example, before this footnotes were not correctly found.
Added also accompanying regression test.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38846 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-26 17:08:48 +00:00
Kornel Benko
b66dcc5536 Revert no intended change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38722 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-12 13:35:10 +00:00
Kornel Benko
45b61c6ecf 1.) Corrected internal compilation for Libintl
2.) Changed cmake-files accordingly
Patch from Jean-Marc Lasgouttes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38606 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-06 19:24:54 +00:00
Tommaso Cucinotta
be9a7223c0 Added test for crash in current trunk (i.e., this is failing now).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38478 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-22 22:23:42 +00:00
Tommaso Cucinotta
25e3d90303 Added check for assertions or anomalous exits of LyX on TestEnd.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38477 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-22 22:23:16 +00:00
Tommaso Cucinotta
cd04601b6f A few clarifications, more TODOs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38411 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-16 10:58:20 +00:00
Tommaso Cucinotta
23258f5399 Regression test for #7442.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38384 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-14 22:21:18 +00:00
Vincent van Ravesteijn
eec88b7e5e Revert wrong previous commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37959 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-19 10:34:59 +00:00
Vincent van Ravesteijn
e52af5f897 Simplify logic in InsetRef::latex().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37958 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-19 10:31:43 +00:00