Commit Graph

569 Commits

Author SHA1 Message Date
Kornel Benko
d49deef4f9 Export tests: Ignore compilations of copernicus with luatex or xetex
The compilations fail because the macro
	\DeclareUnicodeCharacter
is not defined. Also the sequence
	  \ifnum\pdfoutput=\z@
is making troubles.

The exports to previous lyx-versions is disabled too,
because there is no layout defined there.
2018-09-04 15:56:21 +02:00
Kornel Benko
2a72fa3a04 Amend 2877032 2018-08-24 13:20:51 +02:00
Kornel Benko
a860c436c9 ctest export tests: Discard obsolete aastex tests 2018-08-14 14:09:09 +02:00
Kornel Benko
6bfd91ead4 New sample for aastex62
aas_sample62.lyx is a adapted version of aas_sample.lyx
2018-08-14 10:29:15 +02:00
Kornel Benko
b4bbfa5ff0 ctests: ignore obsolete aastex6.cls
aastex6.cls is obsolete in TL18 and replaced by aastex62.cls
2018-08-14 09:40:42 +02:00
Kornel Benko
c515572f5f Cmake key tests: Corrected test findadv-21
Uses the correct shortcuts from lib/bind/sk/menus.bind, but fails nonetheless
because the regex for advanced search cannot find the correct list type.
(That is: it cannot distinguish between 'enumerate', 'itemize', 'labeling', etc.)
2018-07-07 11:10:20 +02:00
Kornel Benko
25ff03d120 Cmake tests: Adapt some keytests due to changed key-bindings 2018-06-23 19:00:04 +02:00
Kornel Benko
b47c31d52a 008-greek-and-coptic.lyx now compilable with iso8859-7 inputencoding
Removed from invertedTests
2018-05-05 08:24:50 +02:00
Scott Kostyshak
9d24033d9b ctests: invert ar/UserGuide_pdf4_texF
Consistent with the other ar docs, this file was never meant to
compile with TeX Fonts (for more information, see the note next to
the inversion).
2018-04-28 23:58:23 -04:00
Kornel Benko
432580e397 Cmake export tests: All cyrillic tests pass no 2018-04-23 14:57:21 +02:00
Kornel Benko
a33d957832 Uninvert some cyrillic and greek tests 2018-04-21 12:13:51 +02:00
Kornel Benko
70dac835d3 Cmake export lyx* tests: Omit compilation of lyx16x, lyx20x and lyx21x exported files
These file don't contain the \\origin tag. So the possibly included
files with relative path would not be found. The compilation to
the default pdf would then anyway fail.
2018-03-15 22:34:26 +01:00
Kornel Benko
8502e6c476 Cmake export lyx* tests: Ignore new lyx2lyx warning
Don't know why this warning is unconditionlly emitted
2018-03-15 22:31:48 +01:00
Günter Milde
fbfa82b313 ctests: Update dedicated lyx2lyx tests. 2018-02-07 18:49:21 +01:00
Günter Milde
0d9708ef04 Use LaTeX macros instead of Latin transcription for Greek characters.
Use the LaTeX internal character representation (LICR) macros
provided by lgrenc.def (since version 0.8 from 2013-05-13)
in lib/unicodesymbols. This fixes the PDF bookmarks (except for the
legacy input encoding iso-8859-7) and solves the problem of a missing
"v" character in Libertine LGR fonts (see lyx-users from 2018-01-29).

The ctest unicodesymbols/008-greek-and-coptic_iso8859-7_pdf2" now fails
(due to #9681). This is not a regression, as it is already
"unreliable" (wrong output, Latin character instead of Greek).

Drop compatibility definition of \~ as perispomeni accent
(that was required with lgrenc.def < 0.8).
2018-01-30 22:31:08 +01:00
Kornel Benko
1e78772291 Cmake tests: New lyx2lyx tests
Created by Günter Milde, after having corrected plenty of lyx2lyx errors
showing with repeated lyx2lyx calls.
2018-01-24 20:56:21 +01:00
Kornel Benko
40e32d4d27 lyx2lyx tests: Check for possible endless expansion
If, after the 10th iteration, the exported lyx16x file still
differs from the one in the previous iteration, the test
is marked as failing, even if still loadable.
2018-01-22 14:43:50 +01:00
Kornel Benko
c7cd1e636c Revert "ctests: Ignore lyx2lyx warnings regarding ligature dashes"
Amends 9ce5d85: Prevent rows of hyphens becoming dashes when back-porting to 2.1.

This reverts commit a5a272ece3.
2018-01-18 08:11:53 +01:00
Scott Kostyshak
dc06714adb ctests: invert for new ru example_lyxified.lyx
Consistent with the ru splash.lyx, we invert the texF tests for the
ru example_lyxified.lyx, which was recently added at 69ef4bc1.
2018-01-17 23:18:08 -05:00
Kornel Benko
26eeaa1af2 vcs_info_export moved to new directory, part 2 2018-01-17 12:25:22 +01:00
Scott Kostyshak
39c22913a2 ctest comment: be more clear about what "!" means
The "!" line only affects tests in that file.

This amends c6d4380c.

Thanks to Kornel for spotting this.
2018-01-17 01:08:26 -05:00
Scott Kostyshak
c6d4380c89 Comment: explain interpretation of "!"
The "!" line takes precedence, since it is first.
2018-01-15 17:28:14 -05:00
Scott Kostyshak
45ee36c0f2 Whitespace 2018-01-15 17:08:20 -05:00
Scott Kostyshak
8a656d95d4 ctests: run only pdf4_systemF for ja knitr/sweave
The "bxjsarticle" class only supports export with XeLaTeX and system
fonts.

This commit uses the new exclusion functionality introduced at
10cd5dd2.

The following tests are now ignored:

  export/examples/ja/knitr_dvi
  export/examples/ja/knitr_pdf
  export/examples/ja/knitr_pdf3
  export/examples/ja/sweave_dvi
  export/examples/ja/sweave_pdf
  export/examples/ja/sweave_pdf3

The following tests are no longer ignored:

  export/examples/ja/knitr_pdf4_systemF
  export/examples/ja/sweave_pdf4_systemF
2018-01-15 16:54:05 -05:00
Scott Kostyshak
10cd5dd223 ctests: allow excluding patterns
This allows us to exclude matches of certain patterns in
invertedTests, ignoredTests, unreliableTests, and suspendedTests.

To use this new functionality, prefix "!" to the pattern.

This functionality serves as a workaround in some cases to not being
able to use advanced regular expression techniques, such as
"negative lookahead", with CMake's regular expression engine.

Output of "ctest -N" is unchanged by this commit.

This functionality will be used soon (see next commits).

Patch from Kornel Benko.
2018-01-15 16:32:05 -05:00
Pavel Sanda
d3163a0bee tests: add ref 2018-01-14 15:04:47 +01:00
Kornel Benko
0e4456ae2e Cmake tests: Don't check in file before creating it 2018-01-06 12:05:51 +01:00
Kornel Benko
c2a5a16d97 Added new testcase to check for correct VCS-Info 2018-01-01 14:05:25 +01:00
Kornel Benko
a5a272ece3 ctests: Ignore lyx2lyx warnings regarding ligature dashes
This may amend 586d16a "Fix lyx2lyx conversion of dashes."
2017-12-29 09:28:12 +01:00
Scott Kostyshak
291d2f1037 ctests: invert tests for Arabic splash
The Arabic splash only compiles with XeTeX + system fonts.
2017-12-18 23:30:37 -05:00
Kornel Benko
597dcbb5be Cmake export tests: Use pre-compiled regular expressions
The expressions are used for determining the used external files
in a lyx-source. Using pre-compiled expr makes it more readable.
2017-11-17 17:53:52 +01:00
Kornel Benko
d8a31f1ee6 Cmake export tests: Collect list of all used wrong paths before terminating
Also try to ignore references for files that are part of latex. If they are wrong, so
latex should handle the errors.
2017-10-27 13:22:17 +02:00
Kornel Benko
6720a8ca7c Cmake export tests: Add the die-message to the diestack() param.
Spotted by Scott.
2017-10-26 22:43:24 +02:00
Kornel Benko
d63a866106 Cmake export tests: Make test fail if there is some non-existant sub-file 2017-10-26 21:48:33 +02:00
Kornel Benko
23e67a3829 Cmake tests: Another case of using temporary files
Ctest misinterprets '#' in filenames as comment start,
2017-10-08 11:04:17 +02:00
Günter Milde
54df2f5446 Seminar export fails with latest TeXLive.
Also update the comment on wrong output with "seminar".
2017-10-08 10:36:24 +02:00
Scott Kostyshak
0c7e5c115d Uninvert Japanese tests after fix to #8823
The export ja/lilypond_pdf fails because ps2pdf gives an error. It
is thus still inverted, under the category 'externalissues'. As
Jürgen discovered, ps2pdf succeeds if the -dNOSAFER flag is used.

Note that Kornel is seeing strange behavior with the sweave test,
and thus the label of that test might be changed soon (e.g. to
"unreliable"). For discussion, see:

https://www.mail-archive.com/search?l=mid&q=20171001032524.fr5xfngylththwv2%40steph
2017-10-07 22:37:42 -04:00
Kornel Benko
92628a2990 cmake tests: Try to use valid locales for testing 2017-10-02 10:35:57 +02:00
Kornel Benko
9a42154107 Cmake export tests: Ignore missing glyphs also for doc/(fr|es)/UserGuide 2017-08-12 14:08:12 +02:00
Kornel Benko
37bcf5392a keytests: Allow for checking multiple log files
Handle name may be arbitrary string mathing '[A-Za-z0-9]*'.
This is then used by appending to the commands for the control file.
For instance select 'Alpha' as handle for the control file 'abc'
'COAlpha: abc' ==> open 'abc' for write
'CCAlpha:' ==> close 'abc'
2017-08-04 11:56:19 +02:00
Kornel Benko
401b54b3f6 ctests: eu_UserGuide_pdf[25] compiles again 2017-07-27 13:39:16 +02:00
Kornel Benko
3cc78bba75 Cmake export tests: Ignore missing glyphs also for doc/de/UserGuide 2017-07-26 12:39:46 +02:00
Kornel Benko
a550f7d91e Cmake export tests: Ignore missing glyphs on some tests
Could not find a suitable tex font for the following tests:
	export/doc/uk/Intro_pdf4_texF
	export/examples/uk/splash_pdf4_texF
	export/examples/minted-filelisting_pdf4_texF
2017-06-27 10:26:27 +02:00
Kornel Benko
195e55d3f4 Cmake export tests: Adapt to minted listings
1.) Handle also 'LatexCommand inputminted' in lyxStatus.pm
2.) Add '-shell-escape' to the appropriate converters.
  This applies only to the ctest-environment iff calling
  the script 'prefTest.pl' in the build directory.
2017-06-16 11:39:26 +02:00
Kornel Benko
bf62343924 Cmake export tests: Ignore some acmart tests for now 2017-06-01 11:07:22 +02:00
Kornel Benko
9e0b09e0a1 keytests: Do not save the session info in bug-10636-test
Otherwise the following tests start with 'display source code' enabled.
2017-05-29 13:53:39 +02:00
Kornel Benko
03df04fd3b Add test for #10636 (fixed in master) 2017-05-27 19:54:59 +02:00
Kornel Benko
ca40fdc569 keytests: Add a small delay to each special key
keytest.py: This gives the os some time to update the status.
  All keys with modifier and all possible shortcuts are affected.

Shortcut use corrected in findadv-11-in.txt and findadv-17-in.txt
2017-05-27 11:18:58 +02:00
Kornel Benko
d547ef7c5e keytests: rewritten testcases to use the new searching engine searchPatterns.pl 2017-05-24 16:29:32 +02:00
Kornel Benko
c03d2f17e9 keytests: Adapt to new shortcuts.
Also, due to resolved shortcut clash in slovak gui, there is now no need to
select 'search whole words' twice.
(\Ac\Ac ==> \Ae)
2017-05-22 18:42:44 +02:00
Kornel Benko
176670fc56 keytests: Move shortcut handling into own class 2017-05-22 08:49:26 +02:00
Kornel Benko
b5229cc5a2 keytests: Wrong check for empty key in associative array 2017-05-21 18:38:48 +02:00
Kornel Benko
fa3e656af7 keytests: Implemented use of additional shortcuts in keytest.py
Now, before starting a test with 'TestBegin' in any *-in.txt file
we can create ne shortcuts used by this test.
Defining a shortcut:
	UseShortcut "<shortcut>" "<function>"
Actually adding the new shortcuts to be used by the next lyx-session:
	PrepareShortcuts

Use example is found in findadv-combined-in.txt
The UseShortcut-entries will be traslated into '\bind "<shortcut>" "<function>"'
and with the PrepareShortcuts-entry added to the active use file 'user.bind'
2017-05-21 12:55:47 +02:00
Kornel Benko
7c72823061 keytests: Shorten the output of wrong matches to 10 lines 2017-05-19 12:58:32 +02:00
Kornel Benko
b8eecc2108 keytests: amend 8f74cac381 2017-05-19 12:56:43 +02:00
Kornel Benko
0abdc3dd59 keytests: Handle function-keys for xvkbd too
Function keys are sent to xvkbd as e.g. \[F15], so we should
not split a sequence like "\C\[F15]" into two text pieces.
(Do it like other keys not having a digit in their name (e.g. \[Return]) )
2017-05-19 12:52:59 +02:00
Kornel Benko
8f74cac381 keytests: Add more controls for the *-in.txt files
The controls are described in hello-world-in.txt as
Cr: not expected regex search pattern before next expected match
Cp: not expected search pattern before next expected match

See also findadv-re-04-in.txt for an example
In this test-case, searching for case sensitive and format considering
search is failing.
2017-05-18 13:05:36 +02:00
Kornel Benko
46e472dcf9 keytests: Allow controlfile (used by searchPatterns.pl) to be opened for 'append'
This allows collecting search strings of multiple tests in one file
2017-05-18 00:03:50 +02:00
Scott Kostyshak
8180b9f97c ctests: invert doc/fr/EmbeddedObjects_pdf4_texF
This test started failing after 8bf3d7bb. I did not look deeply into
why, because the corresponding de and es tests were already
inverted, and because in general we do not expect texF tests to work
well.
2017-05-17 15:18:29 -04:00
Kornel Benko
3bdffab7c8 keytests: Polishing 2017-05-17 13:52:54 +02:00
Kornel Benko
09e5acba11 keytests: Rewritten to use searchPatterns.pl instead of pcregrep
Also corrected output of keytest.py. Messages from called
programs were output to stdout wile own printed messages
were still cached.
2017-05-17 12:12:55 +02:00
Kornel Benko
80bc39ebc9 keytests: Extend the search algorithm to pattern with more as 2 lines 2017-05-16 16:45:18 +02:00
Kornel Benko
9b14eb16f5 keytests: Use flush stdout before exiting
Without the flush, often messages are lost at test-end
2017-05-16 13:01:43 +02:00
Kornel Benko
d870a0f2fd keytests: Added some new controls for the *-in.txt files
The controls are described in hello-world-in.txt as
CO: for control file open for write
CN: control notice
CP: simple search pattern
CR: regex search pattern
CC: close control file

The control-file will be used at the end of test by searchPatterns.pl
2017-05-16 09:16:18 +02:00
Kornel Benko
36a3cca3ea keytests: New script to replace 'pcregrep' in more complex cases.
Suppose, we want to test a key sequence which should produce
logs in defined sequence. ATM, we use pcregrep to see, if
a pattern occurs in the log-file. This is OK, if using only single
tests with only one message to care about.
But it is not OK for combined tests.
As an example, the file 'findadv-combine-in.txt' is combining
tests findadv-re-01-in.txt, findadv-re-02-in.txt and findadv-re-03-in.txt.
This test runns here about 25 seconds, while the time for the other three
is about 144 secs.
(Most time is with starting/stopping lyx)
2017-05-14 18:58:55 +02:00
Scott Kostyshak
00f7a95f62 ctests: invert acmart check_load test
The root issue is known and was reported to maintainer.
2017-05-14 04:30:14 -04:00
Scott Kostyshak
ce390c4e49 ctests: adapt patterns to file move
ACM-siggraph was moved to obsolete folder at 5608f6fd.
2017-05-14 04:24:17 -04:00
Kornel Benko
d06191c990 keytests: Polishing the shutdown of lyx at test-end 2017-05-12 22:32:49 +02:00
Kornel Benko
d9464bfcd6 keytests: Make reading of /proc for lyx-status more robust
Often the relevant entry (e.g. /proc/xxxx/status) exists,
but is empty. This led to many tests fail, mostly at
the first tests after the start of the OS.
2017-05-12 13:55:51 +02:00
Kornel Benko
c200e49d67 keytests: Print proc-info in case lyx_status() signals "dead" 2017-05-12 11:22:05 +02:00
Kornel Benko
6afd654bb6 keytests: more tweaking
Tested with QT5.7 QT5.8 (self compiled) and QT4.8
2017-05-11 00:00:42 +02:00
Kornel Benko
bfc0b09e0c keytests: Added debug 'key' to be able to analyse test results.
There still are keys which do not make it into the lyx logfile.
For instance repeated shortcuts.
2017-05-09 21:08:52 +02:00
Kornel Benko
afd32f7843 keytests: some tweaking 2017-05-09 21:07:35 +02:00
Scott Kostyshak
faea3bdb95 Rename powerdot-example.lyx to powerdot.lyx
The file is already in the examples folder.

Similarly, rename

  examples/fr/exemple-powerdot.lyx -> examples/fr/powerdot.lyx

Consistent with 2f44afcb.
2017-05-09 06:57:55 -04:00
Kornel Benko
cee272e030 Keytests: optimize for speed.
The culprit in keytest is the possibility to lose some keystrokes.
The idead here is that the keystokes are cached by QT until some
control character is entered forcing e.g. new dialog.
So, splitting input lines at these characters should be enough
to ensure that the next chars are not lost.
2017-05-07 14:48:06 +02:00
Kornel Benko
48ecf06d9b Cmake keytests: Don't care for lyx still not finished.
The called script keytest.py already takes care of that.
2017-05-07 13:49:10 +02:00
Kornel Benko
948020d9a3 Keytests: Make logfiles unique.
Each test created log-files, but since they were not uniq it was difficult
to check what went wrong for a failed test.
2017-05-07 13:45:48 +02:00
Günter Milde
275bb44158 ctests: move issue with nomenclature insets to a dedicated test case.
iconv fails, if a nomenclature inset contains an uncodable character
This led to failure of the indonesian UserGuide in the attic.
Fix it there and add a minimal, specific test sample instead.
2017-05-04 18:05:18 +02:00
Kornel Benko
d1271f80ec Keytests: improve handling of strings to be send to xvkbd
1.) Don't modify the line as it happened at start of sendKeystringLocal()
2.) Split lines on each keysym (e.g. \[Return])
3.) Beatify the debug output of the sent text
2017-05-04 13:53:09 +02:00
Kornel Benko
c4c989b9c8 Added testcase for crash with using function word-findadv 2017-05-02 12:22:09 +02:00
Kornel Benko
4436431ea5 Remove xvkbd from cmake build.
The directory still exists because automake build refers it.
2017-04-28 11:42:50 +02:00
Kornel Benko
4495481d97 Added a testcase for #8381 (advanced find & replace for lists) 2017-04-27 13:11:21 +02:00
Kornel Benko
514bcb9d93 Keytests: Make the wrapper sendKeystring() around sendKeystringLocal() be recursive
This makes the wrapper working smoothly even for more complicated
input lines.
Also we do not need the window- parameter in call to xvkbd.
Still, there _is_ something fishy. At first run it can happen that
some keytest fail. But not reproducible at subsequent calls.
It feels like QT would cache some data and therefore lyx reacts
later faster.
This work is a result of collaboration with Tommaso Cucinotta.
2017-04-26 16:03:24 +02:00
Kornel Benko
515ca69359 keytests: Speed up some tests
The idea is, that strings going to the lyx-command-field
can be sent at full speed.
2017-04-25 17:37:25 +02:00
Kornel Benko
39d3308721 make the message about ignoring errors clearer 2017-04-24 17:44:31 +02:00
Kornel Benko
54f2d0ee22 keytests: small improvements in test speed 2017-04-24 17:43:39 +02:00
Kornel Benko
0cda6808d7 keytests: Some improvements to keytest.py
Changes are:
1.) make it python3 compatible
2.) rewritten the lyx_status() routine
3.) routines lyx_sleeping(), lyx_zombie(), lyx_dead() now depend on lyx_status()
4.) dont send keystring "\Afn" at start as it is language dependent
5.) handling of TestEnd uses now lyx-commands to stop the lyx-session.
   Use 'kill -9' only if unsuccessful
2017-04-24 17:42:24 +02:00
Tommaso Cucinotta
9824926b4c findadv: using \w instead of [[:word:]] makes test-case std::regex compatible; also, fixed UI shortcuts changes that made test fail. 2017-04-17 00:15:26 +02:00
Tommaso Cucinotta
664798128a findadv: almost all test cases, including \regex[{}, back to working with std::regex. 2017-04-17 00:15:26 +02:00
Tommaso Cucinotta
a1024781bc autotests: skip overly long export-in.sh test by default. 2017-04-16 11:26:29 +02:00
Tommaso Cucinotta
a8bb3171f1 Recovered working autotests for findadv on Linux/Ubuntu (after a long no-use time).
- from specific dependency on wish8.5, to just wish
- from checking the 2nd line of /proc/*/status, to grep-ing on sleeping (old system was failing on newer kernels)
- mode debugging and python output during tests
2017-04-15 23:38:41 +02:00
Günter Milde
ddacfc0581 ctests: test unicodesymbols also with utf8.
The the default input encoding (utf8) whas somehow dropped from
the list. Restore it with explicit naming.
2017-04-12 12:42:26 +02:00
Kornel Benko
c99e2f1fad Add label 'defaultoutput' to export tests using document default output format 2017-03-10 14:35:11 +01:00
Kornel Benko
ef05496ce9 Cmake tests: Add visual indication if a test is ignoring some latex error messages 2017-03-02 15:53:34 +01:00
Kornel Benko
513bb5dad0 Remove regex which does mot mach any test 2017-03-01 18:49:22 +01:00
Günter Milde
42e9c448b0 ctests: Fix some "unreliable" patterns. 2017-03-01 18:31:44 +01:00
Kornel Benko
b8710d8e16 Amend 34d2f3c.
Regexes in *Tests have to be specified for the whole test-names.
2017-03-01 10:04:29 +01:00
Scott Kostyshak
34d2f3cf06 Ignore missing glyphs in a test after TL update
After a TL 2016 update, a test started to fail due to missing
glyphs. For more information, see the ML thread here:

  https://www.mail-archive.com/search?l=mid&q=20170225203955.nas2qopy4l4ukyqq%40steph
2017-02-28 18:31:02 -05:00
Scott Kostyshak
2298ae05f2 Invert a pdf4 test failing because of iconv
This is consistent with other tests failing for the same reason.
For more information, see #9871 and the discussion at

  https://www.mail-archive.com/search?l=mid&q=20170228190738.cgs3tl3ny2bxiegk%40steph
2017-02-28 18:21:23 -05:00
Günter Milde
443eb7bf79 ctests: invert failing Spanish docs, tag unreliable examples.
Babel-Spanish uses utf8-autostrings if it detects Xe/LuaTeX.
This leads to wrong output and/or failures with
8bit TeX-fonts and 8-bit input encoding.
2017-02-27 23:26:08 +01:00