redundant cprotect's
Scott Kostyshak
skostysh at lyx.org
Thu Sep 28 15:17:40 UTC 2023
On Thu, Sep 28, 2023 at 04:34:45PM +0300, Udicoudco wrote:
> Hello all,
>
> Can anyone think of a simple case where cprotect is used?
> I think we have some redundant cases where we can remove
> the protection (such as before \L or \R because they don't really
> take an argument), and I want to test that.
We have some test documents. Do you by chance use CMake to build LyX? If
so, add the flag "-DLYX_ENABLE_EXPORT_TESTS=ON" in your 'cmake' call
(unfortunately this flag adds some time, e.g., 20 seconds) and then you
can run:
ctest -R "cprotect"
First run that to confirm the tests currently pass for you (all 30 do
for me).
Then make the code change and run those tests again.
Those tests took just 42 seconds to run serially, but if you want to
speed things up, you can run them in parallel, e.g.:
ctest -j8 -R "cprotect"
This took 10 seconds.
If something in the above process doesn't work, let us know and we can
try to figure it out. I think only Kornel and I have been running the
ctests so it would be great to have other testers.
If you don't want to use the ctests, you can also search the repository
for "cprotect" to find the test documents. It would be great to have
some test documents in Hebrew if you can contribute some. Currently, I
think our tests only check compilation errors. i.e., they don't check
that the appearance is correct.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230928/ed88f58a/attachment.asc>
More information about the lyx-devel
mailing list