[latex3-commits] [git/LaTeX3-latex3-latex2e] cmd: Add test file used in this crusade (95223fdc)

PhelypeOleinik phelype.oleinik at latex-project.org
Sun Jan 24 22:09:38 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : cmd
Link       : https://github.com/latex3/latex2e/commit/95223fdce42cc8bd7f6e90fa2c4e4d644c0a6137

>---------------------------------------------------------------

commit 95223fdce42cc8bd7f6e90fa2c4e4d644c0a6137
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sun Jan 24 18:09:38 2021 -0300

    Add test file used in this crusade


>---------------------------------------------------------------

95223fdce42cc8bd7f6e90fa2c4e4d644c0a6137
 base/testfiles-disabled/ltcmd-latexrelease.lvt | 140 +++++++++++++++++++++++++
 1 file changed, 140 insertions(+)

diff --git a/base/testfiles-disabled/ltcmd-latexrelease.lvt b/base/testfiles-disabled/ltcmd-latexrelease.lvt
new file mode 100644
index 00000000..7d8ae7cf
--- /dev/null
+++ b/base/testfiles-disabled/ltcmd-latexrelease.lvt
@@ -0,0 +1,140 @@
+\iffalse
+
+This is the test file I used to check that xparse
+remains working after the move to ltcmd, and that
+latexrelease also works with xparse.sty (if it is
+loaded before xparse).  The tests here do require
+some gymnastics with git and mktexfmt to get them
+running, so I will leave them disabled meanwhile.
+
+The tests here check three points in time:
+ - pre 2020-10-01 (I tested with 2020-02-02-PL5)
+ - 2020-10-01
+ - post 2020-10-01 (tested with dev-2021-05-01-1)
+
+Each of these test 5 cases:
+ - loading xparse
+ - lading latexrelease to each of the other dates
+   (this makes two tests)
+ - loading xparse in each latexrelease test
+   (another two)
+
+To test them I did
+    git checkout <tag>
+to change to the release I wanted to test, and
+    l3build install
+to install it in my local TeX tree, then
+    mktexlsr
+to regenerate the filename database for the local
+tree, if some file some file changed, and finally
+    mktexfmt pdflatex.fmt
+(I didn't care to test the other engines for this
+change) to build a local format to start the fun!
+
+Then in the test file I changed the number in the
+ifcase line for each corresponding test.  The log
+output varies between (hello//world) if xparse is
+loaded, and [hello//world] if it is not but other
+than that it should throw some error if something
+is off.
+
+Good luck!
+
+\fi
+
+\ifcase 15
+%
+% git checkout release-2020-02-02-PL5
+%
+\or % 01
+\RequirePackage{xparse}
+\or % 02
+\RequirePackage[2020-10-01]{latexrelease}
+\PopDefaultHookLabel %%%%% FIXME
+\or % 03
+\RequirePackage[2020-10-01]{latexrelease}
+\PopDefaultHookLabel %%%%% FIXME
+\RequirePackage{xparse}
+\or % 04
+\RequirePackage[2021-05-01]{latexrelease}
+\PopDefaultHookLabel %%%%% FIXME
+\or % 05
+\RequirePackage[2021-05-01]{latexrelease}
+\PopDefaultHookLabel %%%%% FIXME
+\RequirePackage{xparse}
+%
+% git checkout release-2020-10-01-PL4
+%
+\or % 06
+\RequirePackage{xparse}
+\or % 07
+\RequirePackage[2020-02-02]{latexrelease}
+\or % 08
+\RequirePackage[2020-02-02]{latexrelease}
+\RequirePackage{xparse}
+\or % 09
+\BROKEN: user-level stuff already defined
+\RequirePackage[2021-05-01]{latexrelease}
+\or % 10
+\BROKEN: user-level stuff already defined
+\RequirePackage[2021-05-01]{latexrelease}
+\RequirePackage{xparse}
+%
+% git checkout develop
+%
+\or % 11
+\RequirePackage{xparse}
+\or % 12
+\RequirePackage[2020-02-02]{latexrelease}
+\or % 13
+\RequirePackage[2020-02-02]{latexrelease}
+\RequirePackage{xparse}
+\or % 14
+\BROKEN: can't rollback lthooks
+\PushDefaultHookLabel{foo}
+\RequirePackage[2020-10-01]{latexrelease}
+\or % 15
+\BROKEN: can't rollback lthooks
+\PushDefaultHookLabel{foo}
+\PushDefaultHookLabel{foo}
+\PushDefaultHookLabel{foo}
+\PushDefaultHookLabel{foo}
+\RequirePackage[2020-10-01]{latexrelease}
+\RequirePackage{xparse}
+\else \INVALID
+\fi
+
+% Check if \ExplSyntaxOff
+\ifnum10=1 0~\ERROR\fi
+
+\makeatletter
+% Not a fan of reversed logic
+\def\@ifdefined#1#2#3{\@ifundefined{#1}{#3}{#2}}
+
+% \typeout{\expandafter\meaning\csname __xparse_normalize_type_g:w\endcsname}
+% \typeout{\expandafter\meaning\csname __xparse_normalize_type_d:w\endcsname}
+% \typeout{\expandafter\meaning\csname __cmd_normalize_type_g:w\endcsname}
+% \typeout{\expandafter\meaning\csname __cmd_normalize_type_d:w\endcsname}
+
+\@ifpackageloaded{xparse}
+  {\@ifdefined{__xparse_normalize_type_g:w}
+    {\@ifdefined{__cmd_normalize_type_g:w}%
+      {\@latex at error{Mismatched deprecated types A}\@ehd}}%
+    {\@ifdefined{__cmd_normalize_type_g:w}
+      {\@ifdefined{__xparse_normalize_type_g:w}%
+        {\@latex at error{Mismatched deprecated types B}\@ehd}}%
+      {\@latex at error{Missing deprecated types}\@ehd}}}
+  {\ifdefined\NewDocumentCommand\else\@latex at error{NewDocumentCommand undefined}\@ehd\fi%
+   \@gobblefour}
+\NewExpandableDocumentCommand\foo{lm}{(#1//#2)}
+\def\nfo#1#{\nfoo{#1}}\def\nfoo#1#2{[#1//#2]}
+
+\def\usefoo{\ifdefined\foo \expandafter\foo
+\else \expandafter\nfo \fi}
+
+\typeout{--------------------------------}
+\typeout{\csname ver at xparse.sty\endcsname}
+\typeout{\usefoo hello{world}}
+\typeout{--------------------------------}
+
+\stop





More information about the latex3-commits mailing list.