This is an important part of the tests. If updating the test cases is really a
problem there are two better solutions than not testing the format: Convert
the references with lyx2lyx on the fly, or remove the hard coupling of tex2lyx
and LyX versions again. Both increase additional possible error sources, but
these errors could at least be detected. If the test machinery is made blind
for versions, file format errors are impossible to detect.
Jean-Marc discovered a possible data loss caused by Parser::getChar().
This is now fixed, and Parser::getChar() is removed, since it is no longer
needed and easy to use it in the wrong way.
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"
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).
- nothing needs to be done for feyn.sty - it is already recognized as simple feature and the roundtrip using the feynman example file works
- update entry for undertilde to be uniform
- this new modernCV version fixes the annoying linebreak bug I was suffering so long, it moreover adds 2 new features
- lyx2lyx/lyx_2_1.py: updated to revert the new features
When switching catcodes (for example to verbatim), there are in general some tokens that have already been parsed according to the old catcodes. It is therefore needed to "forget" those token and reparse them.
The basic idea is to use idocstream::putback() to feed the characters back to the stream, but this does not work (probably because we disable buffering). Therefore, we implement a simple stream-like class that implements putback().
The current code is not able to unset an environment variable, only to set it to an empty value. This patch refactors a bit the Message class and uses a new EnvChanger helper class that allows to change temporarily an environment variable and that is able to unset variables if needed.
The patch also adds new functions hasEnv and unsetEnv in environment.cpp.
Open issues:
* there may be systems where unsetenv is not available and putenv("name=") does not do the right thing;
* unsetenv may lead to leaks on some platforms.
* when using unsetenv, we may need to remove strings from the internal map that setEnv uses.