[latex3-commits] [git/LaTeX3-latex3-latex3] xparse: Make sure xparse.tex works without the .sty (a0aa783f5)

PhelypeOleinik tex.phelype at gmail.com
Tue May 12 03:59:18 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : xparse
Link       : https://github.com/latex3/latex3/commit/a0aa783f5977359c29fa7e350e58276ee292e796

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

commit a0aa783f5977359c29fa7e350e58276ee292e796
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Mon May 11 22:59:18 2020 -0300

    Make sure xparse.tex works without the .sty


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

a0aa783f5977359c29fa7e350e58276ee292e796
 l3packages/xparse/testfiles/xparse006.lvt | 30 +++++++++++++++++++++
 l3packages/xparse/testfiles/xparse006.tlg | 43 +++++++++++++++++++++++++++++++
 l3packages/xparse/xparse.dtx              | 27 +++++++++++--------
 3 files changed, 89 insertions(+), 11 deletions(-)

diff --git a/l3packages/xparse/testfiles/xparse006.lvt b/l3packages/xparse/testfiles/xparse006.lvt
new file mode 100644
index 000000000..ce5422237
--- /dev/null
+++ b/l3packages/xparse/testfiles/xparse006.lvt
@@ -0,0 +1,30 @@
+%
+% Copyright (C) 2020 LaTeX3 Project
+%
+
+\documentclass{minimal}
+\input{regression-test}
+
+\RequirePackage[enable-debug]{expl3}
+\ExplSyntaxOn
+\debug_on:n { check-declarations , deprecation , log-functions }
+\ExplSyntaxOff
+% \RequirePackage{xparse}
+\input xparse.tex
+
+\begin{document}
+
+\START
+\AUTHOR{Phelype Oleinik}
+
+\ExplSyntaxOn
+
+\TEST { Deprecated~argument~types }
+  {
+    \NewDocumentCommand { \testA } { G } { }
+    \NewDocumentCommand { \testA } { g } { }
+    \NewDocumentCommand { \testA } { l } { }
+    \NewDocumentCommand { \testA } { u } { }
+  }
+
+\END
diff --git a/l3packages/xparse/testfiles/xparse006.tlg b/l3packages/xparse/testfiles/xparse006.tlg
new file mode 100644
index 000000000..d26aa09ff
--- /dev/null
+++ b/l3packages/xparse/testfiles/xparse006.tlg
@@ -0,0 +1,43 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Phelype Oleinik
+============================================================
+TEST 1: Deprecated argument types
+============================================================
+LaTeX3 Info: Defining command \testA with sig. 'G' on line ....
+! LaTeX3 Error: Deprecated argument type 'G' for the command '\testA' requires
+(LaTeX3)        xparse.
+For immediate help type H <return>.
+ ...                                              
+l. ...  }
+The letter 'G' specifies a known argument type that requires the xparse
+package.
+LaTeX will ignore this entire definition.
+LaTeX3 Info: Defining command \testA with sig. 'g' on line ....
+! LaTeX3 Error: Deprecated argument type 'g' for the command '\testA' requires
+(LaTeX3)        xparse.
+For immediate help type H <return>.
+ ...                                              
+l. ...  }
+The letter 'g' specifies a known argument type that requires the xparse
+package.
+LaTeX will ignore this entire definition.
+LaTeX3 Info: Defining command \testA with sig. 'l' on line ....
+! LaTeX3 Error: Deprecated argument type 'l' for the command '\testA' requires
+(LaTeX3)        xparse.
+For immediate help type H <return>.
+ ...                                              
+l. ...  }
+The letter 'l' specifies a known argument type that requires the xparse
+package.
+LaTeX will ignore this entire definition.
+LaTeX3 Info: Defining command \testA with sig. 'u' on line ....
+! LaTeX3 Error: Deprecated argument type 'u' for the command '\testA' requires
+(LaTeX3)        xparse.
+For immediate help type H <return>.
+ ...                                              
+l. ...  }
+The letter 'u' specifies a known argument type that requires the xparse
+package.
+LaTeX will ignore this entire definition.
+============================================================
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 19b41bf1e..841fa5082 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -1031,16 +1031,10 @@
 %</package>
 %    \end{macrocode}
 %
-%    \begin{macrocode}
-%<*2ekernel|package>
-%    \end{macrocode}
-%
 %  Load the core code.
 %    \begin{macrocode}
+%<*2ekernel|package>
 \file_input:n { xparse.tex }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 %</2ekernel|package>
 %    \end{macrocode}
 %
@@ -1062,6 +1056,17 @@
 %    \end{macrocode}
 % \end{variable}
 %
+%    \begin{macrocode}
+%<*core>
+\if_charcode:w xx
+  \cs_new:Npn \@@_file_end_hook: { }
+\else
+  \ExplSyntaxOn
+  \cs_new:Npn \@@_file_end_hook: { \ExplSyntaxOff }
+\fi:
+%</core>
+%    \end{macrocode}
+%
 % \begin{variable}{\l_@@_arg_spec_tl}
 %   Holds the argument specification after normalization of shorthands.
 %    \begin{macrocode}
@@ -5204,14 +5209,14 @@
 %
 %    \begin{macrocode}
 %<*2ekernel>
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 \ExplSyntaxOff
+%</2ekernel>
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%</2ekernel>
+%<*core>
+\@@_file_end_hook:
+%</core>
 %</!package>
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list.