[latex3-commits] [latex3/latex2e] latexlab/rcb: Add test files for sockets; change error handling; change default plug handling for new sockets (b746050c)

github at latex-project.org github at latex-project.org
Sun Jul 23 23:10:02 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : latexlab/rcb
Link       : https://github.com/latex3/latex2e/commit/b746050c4d32fb2f3db256bbeacfd147230b8edc

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

commit b746050c4d32fb2f3db256bbeacfd147230b8edc
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sun Jul 23 23:10:02 2023 +0200

    Add test files for sockets;
    change error handling;
    change default plug handling for new sockets


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

b746050c4d32fb2f3db256bbeacfd147230b8edc
 required/latex-lab/latex-lab-socket.dtx            | 110 ++++++++++++++-------
 .../latex-lab/testfiles-OR/check-declarations.tlg  |   8 +-
 required/latex-lab/testfiles-OR/footmisc-002.tlg   |   8 +-
 required/latex-lab/testfiles-OR/footmisc-003.tlg   |   8 +-
 required/latex-lab/testfiles-OR/footmisc-004.tlg   |   8 +-
 required/latex-lab/testfiles-OR/footmisc-005.tlg   |   8 +-
 required/latex-lab/testfiles-OR/footmisc-006.tlg   |   8 +-
 .../testfiles-OR/footmisc-007-rollback.tlg         |   8 +-
 .../testfiles-OR/footmisc-009-multiple-tagging.tlg |   8 +-
 .../testfiles-OR/footmisc-009-multiple.tlg         |   8 +-
 .../testfiles-OR/footmisc-010-setspace-tagging.tlg |   8 +-
 .../testfiles-OR/footmisc-010-setspace.tlg         |   8 +-
 .../latex-lab/testfiles-OR/footmisc-011-para.tlg   |   8 +-
 .../testfiles-OR/footmisc-012-side-hyperref.tlg    |   8 +-
 .../latex-lab/testfiles-OR/footmisc-012-side.tlg   |   8 +-
 .../testfiles-OR/footmisc-013-scrartcl.tlg         |   8 +-
 .../footmisc-floats-abovefloats-flushbottom.tlg    |   8 +-
 .../testfiles-OR/footmisc-floats-abovefloats.tlg   |   8 +-
 .../footmisc-floats-belowfloats-flushbottom.tlg    |   8 +-
 .../testfiles-OR/footmisc-floats-latex.tlg         |   8 +-
 .../testfiles-OR/footnote-float-above.tlg          |   8 +-
 required/latex-lab/testfiles-OR/footnote-par.tlg   |   8 +-
 required/latex-lab/testfiles-OR/tagging-001.tlg    |   8 +-
 required/latex-lab/testfiles/socket-000.lvt        |  57 +++++++++++
 required/latex-lab/testfiles/socket-000.tlg        |  68 +++++++++++++
 required/latex-lab/testfiles/socket-001.lvt        |  47 +++++++++
 required/latex-lab/testfiles/socket-001.tlg        |  42 ++++++++
 27 files changed, 377 insertions(+), 123 deletions(-)

diff --git a/required/latex-lab/latex-lab-socket.dtx b/required/latex-lab/latex-lab-socket.dtx
index 22c8ebf5..9080d437 100644
--- a/required/latex-lab/latex-lab-socket.dtx
+++ b/required/latex-lab/latex-lab-socket.dtx
@@ -372,15 +372,24 @@
 % \cs{socket_new:nn}\Arg{socket-name}\Arg{number-of-arguments}
 % \end{syntax}
 %   Declares a new socket with name \meta{socket-name} having
-%   \meta{number-of-arguments} arguments. By default it does nothing
-%   other than gobbling the arguments,
-%   i.e., executes the plug \plug{noop}, which is automatically
-%   defined for the new socket as part of the declaration.
-%   \fmi{For some sockets a noop hook is useless so perhaps we
-%   should not make that default declaration. On the other hand for
-%   many sockets it is useful -- decide }
-%
-%   Its documentation should describe its purpose, its inputs and the
+%   \meta{number-of-arguments} arguments. There is automatically a
+%   plug {noop} declared for it, which does nothing, i.e., it gobbles
+%   the socket argument. This is made the default plug except for
+%   sockets with one argument which use \plug{identity} as their default.
+%
+%   This \plug{identity} plug simply returns the socket argument without
+%   its outer braces.
+%   The use case for this are situations like this:
+%   \begin{quote}
+%      \cs{UseSocket}\verb={tagsupport/footnote}=\Arg{code}
+%   \end{quote}
+%   If tagging is not active and the socket contains the plug \plug{identity}
+%   then this returns \meta{code} without the outer braces and to
+%   activate tagging all that is necessary is to change the plug to
+%   say \plug{tagpdf} so
+%   that it surrounds \meta{code} by some tagging magic.
+%
+%   The socket documentation should describe its purpose, its inputs and the
 %   expected results as discussed above.
 %
 %   The declaration is only allowed at top-level, i.e., not inside a group.
@@ -501,8 +510,13 @@
             \str_new:c { l_@@_#1_plug_str }
             \seq_new:c { l_@@_#1_plugs_seq }
             \int_const:cn { c_@@_#1_args_int } {#2}
-            \socket_new_plug:nnn {#1} { noop } { }
-            \socket_assign_plug:nn {#1} { noop }
+            \socket_new_plug:nnn {#1} { noop } {}
+            \int_compare:nNnTF #2 = 1
+                {
+                  \socket_new_plug:nnn {#1} { identity } {##1}
+                  \socket_assign_plug:nn {#1} { identity }
+                }
+               { \socket_assign_plug:nn {#1} { noop } }
           }
           {
             \errmessage { Sockets~ can~ only~ be~ declared~ at~ top-level! }
@@ -527,7 +541,7 @@
         \typeout{ \@spaces current~ plug~ =~ \str_use:c { l_@@_#1_plug_str } }
         \typeout{ \@spaces definition~ =~
           \exp_args:Nc \cs_meaning:N 
-                       { _@@_#1_code_ \str_use:c { l_@@_#1_plug_str } :w } }
+                       { _@@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w } }
         \typeout{}
       }
       {
@@ -542,36 +556,55 @@
 %  
 %  
 %  
-%  \begin{macro}{\socket_new_plug:nnn,\socket_set_plug:nnn,\@@_define_code:Nnnnnn}
+%  \begin{macro}{\socket_new_plug:nnn,\socket_set_plug:nnn}
 %    
 %    Declaring a code for a socket is just making a definition, taking
 %    the number of arguments from the saved int.
 %    \begin{macrocode}
-\cs_new_protected:Npn \socket_new_plug:nnn {
-  \@@_define_code:Nnnnn \cs_new_protected:Npn \seq_put_right:cn 
-}
-\cs_new_protected:Npn \socket_set_code:nnn {
-  \@@_define_code:Nnnnn \cs_set_protected:Npn  \use_none:nn 
-}
-%    \end{macrocode}
-%    \fmi{probably nicer to read if two defs are made instead}
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_define_code:Nnnnn #1 #2 #3 #4 #5 {
-  \str_if_exist:cTF { l_@@_#3_plug_str }
+\cs_new_protected:Npn \socket_new_plug:nnn #1#2#3 {
+  \str_if_exist:cTF { l_@@_#1_plug_str }
       {
-        \cs_generate_from_arg_count:cNnn
-           { @@_#3_code_#4:w }
-           #1
-           { \int_use:c { c_@@_#3_args_int } }
-           {#5}
+        \str_if_exist:cTF { @@_#1_plug_#2:w }
+           {
+             \errmessage { Plug~ '#2'~ for~ socket~ '#1'~ already~ declared! }
+           }
+           {
+             \cs_generate_from_arg_count:cNnn
+                { @@_#1_plug_#2:w }
+                \cs_new_protected:Npn
+                { \int_use:c { c_@@_#1_args_int } }
+                {#3}
 %    \end{macrocode}
 %    If this is a new declaration we add the name to a seq for
 %    debugging info.
 %    \begin{macrocode}
-        #2 { l_@@_#3_plugs_seq } {#4}
+             \seq_put_right:cn { l_@@_#1_plugs_seq } {#2}
+           }
       }
       {
-        \errmessage { Socket~ '#3'~ not~ declared! }
+        \errmessage { Socket~ '#1'~ undeclared! }
+      }
+}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\cs_new_protected:Npn \socket_set_plug:nnn #1#2#3 {
+  \str_if_exist:cTF { l_@@_#1_plug_str }
+      {
+        \str_if_exist:cTF { @@_#1_plug_#2:w }
+           {
+             \cs_generate_from_arg_count:cNnn
+                { @@_#1_plug_#2:w }
+                \cs_set_protected:Npn
+                { \int_use:c { c_@@_#1_args_int } }
+                {#3}
+           }
+           {
+             \errmessage { Plug~ '#2'~ for~ socket~ '#1'~ undeclared! }
+           }
+      }
+      {
+        \errmessage { Socket~ '#1'~ undeclared! }
       }
 }
 %    \end{macrocode}
@@ -587,16 +620,16 @@
 \cs_new_protected:Npn \socket_assign_plug:nn #1 #2 {
   \str_if_exist:cTF { l_@@_#1_plug_str }
       {
-        \cs_if_exist:cTF { @@_#1_code_#2:w }
+        \cs_if_exist:cTF { @@_#1_plug_#2:w }
           {
             \str_set:cn { l_@@_#1_plug_str } {#2}
           }
           {
-            \errmessage { Socket~ instance~ '#2'~ for~ the~ socket~ '#1'~ not~ declared! }
+            \errmessage { Plug~ '#2'~ for~ the~ socket~ '#1'~ undeclared! }
           }
       }
       {
-        \errmessage { Socket~ '#1'~ not~ declared! }
+        \errmessage { Socket~ '#1'~ undeclared! }
       }
 }
 %    \end{macrocode}
@@ -607,9 +640,16 @@
 %    
 %    And using it is more or less a \cs{use:c} so very lightweight. We do not add a
 %    runtime check for speed reasons!
+%
+%    \fmi{maybe this command should be correctly named
+%    \cs{socket_use:nw} since we don't know how many arguments the
+%    socket has, or we could offer aliases \cs{socket_use:nn},
+%    etc.\ so that one can indicate the correct number of arguments in
+%    L3 layer code.}
+%
 %    \begin{macrocode}
 \cs_new_protected:Npn \socket_use:n #1 {
-  \use:c { _@@_#1_code_ \str_use:c { l_@@_#1_plug_str } :w }
+  \use:c { _@@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w }
 }
 %    \end{macrocode}
 %  \end{macro}
diff --git a/required/latex-lab/testfiles-OR/check-declarations.tlg b/required/latex-lab/testfiles-OR/check-declarations.tlg
index 50ad46c3..0448c601 100644
--- a/required/latex-lab/testfiles-OR/check-declarations.tlg
+++ b/required/latex-lab/testfiles-OR/check-declarations.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-002.tlg b/required/latex-lab/testfiles-OR/footmisc-002.tlg
index a5a285a7..50504a91 100644
--- a/required/latex-lab/testfiles-OR/footmisc-002.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-002.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-003.tlg b/required/latex-lab/testfiles-OR/footmisc-003.tlg
index fa4155d9..6decaea2 100644
--- a/required/latex-lab/testfiles-OR/footmisc-003.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-003.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-004.tlg b/required/latex-lab/testfiles-OR/footmisc-004.tlg
index 961cfc13..86b78d42 100644
--- a/required/latex-lab/testfiles-OR/footmisc-004.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-004.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-005.tlg b/required/latex-lab/testfiles-OR/footmisc-005.tlg
index 67a1d7a4..e085ad49 100644
--- a/required/latex-lab/testfiles-OR/footmisc-005.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-005.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = para
     definition = \protected\long macro:#1->\setbox \FN at tempboxa \hbox {\@makefntext {#1}}\dp \FN at tempboxa \z@ \ht \FN at tempboxa \dimexpr \wd \FN at tempboxa *\footnotebaselineskip /\columnwidth \relax \box \FN at tempboxa 
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-006.tlg b/required/latex-lab/testfiles-OR/footmisc-006.tlg
index 5ed31b2e..1ffb640a 100644
--- a/required/latex-lab/testfiles-OR/footmisc-006.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-006.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = para
     definition = \protected\long macro:#1->\setbox \FN at tempboxa \hbox {\@makefntext {#1}}\dp \FN at tempboxa \z@ \ht \FN at tempboxa \dimexpr \wd \FN at tempboxa *\footnotebaselineskip /\columnwidth \relax \box \FN at tempboxa 
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg b/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
index b3cee4bd..53adb8ec 100644
--- a/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
@@ -37,12 +37,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -62,8 +62,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-009-multiple-tagging.tlg b/required/latex-lab/testfiles-OR/footmisc-009-multiple-tagging.tlg
index 3f174cd0..8b3fa421 100644
--- a/required/latex-lab/testfiles-OR/footmisc-009-multiple-tagging.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-009-multiple-tagging.tlg
@@ -34,12 +34,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -59,8 +59,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-009-multiple.tlg b/required/latex-lab/testfiles-OR/footmisc-009-multiple.tlg
index 283c121a..0e806840 100644
--- a/required/latex-lab/testfiles-OR/footmisc-009-multiple.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-009-multiple.tlg
@@ -34,12 +34,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -59,8 +59,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-010-setspace-tagging.tlg b/required/latex-lab/testfiles-OR/footmisc-010-setspace-tagging.tlg
index efc80c28..572a7fdf 100644
--- a/required/latex-lab/testfiles-OR/footmisc-010-setspace-tagging.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-010-setspace-tagging.tlg
@@ -29,12 +29,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -54,8 +54,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-010-setspace.tlg b/required/latex-lab/testfiles-OR/footmisc-010-setspace.tlg
index 3f9dff91..34708233 100644
--- a/required/latex-lab/testfiles-OR/footmisc-010-setspace.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-010-setspace.tlg
@@ -29,12 +29,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -54,8 +54,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-011-para.tlg b/required/latex-lab/testfiles-OR/footmisc-011-para.tlg
index c5eddb78..888824e4 100644
--- a/required/latex-lab/testfiles-OR/footmisc-011-para.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-011-para.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = para
     definition = \protected\long macro:#1->\setbox \FN at tempboxa \hbox {\@makefntext {#1}}\dp \FN at tempboxa \z@ \ht \FN at tempboxa \dimexpr \wd \FN at tempboxa *\footnotebaselineskip /\columnwidth \relax \box \FN at tempboxa 
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-012-side-hyperref.tlg b/required/latex-lab/testfiles-OR/footmisc-012-side-hyperref.tlg
index 1d07f530..469ee07d 100644
--- a/required/latex-lab/testfiles-OR/footmisc-012-side-hyperref.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-012-side-hyperref.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = side
     definition = \protected\long macro:#1->\marginpar {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-012-side.tlg b/required/latex-lab/testfiles-OR/footmisc-012-side.tlg
index 17cfee48..eaa44c63 100644
--- a/required/latex-lab/testfiles-OR/footmisc-012-side.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-012-side.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = side
     definition = \protected\long macro:#1->\marginpar {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg b/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
index d2e5a659..08e3f5aa 100644
--- a/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
@@ -23,12 +23,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <6> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -48,8 +48,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats-flushbottom.tlg b/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats-flushbottom.tlg
index 4ea163d5..00f33f94 100644
--- a/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats-flushbottom.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats-flushbottom.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats.tlg b/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats.tlg
index 6570ca54..3b08990d 100644
--- a/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-floats-abovefloats.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-floats-belowfloats-flushbottom.tlg b/required/latex-lab/testfiles-OR/footmisc-floats-belowfloats-flushbottom.tlg
index ae0bfdac..767c7cdb 100644
--- a/required/latex-lab/testfiles-OR/footmisc-floats-belowfloats-flushbottom.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-floats-belowfloats-flushbottom.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footmisc-floats-latex.tlg b/required/latex-lab/testfiles-OR/footmisc-floats-latex.tlg
index 0692f212..11431443 100644
--- a/required/latex-lab/testfiles-OR/footmisc-floats-latex.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-floats-latex.tlg
@@ -18,12 +18,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -43,8 +43,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footnote-float-above.tlg b/required/latex-lab/testfiles-OR/footnote-float-above.tlg
index 7397b300..79dc9f9f 100644
--- a/required/latex-lab/testfiles-OR/footnote-float-above.tlg
+++ b/required/latex-lab/testfiles-OR/footnote-float-above.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/footnote-par.tlg b/required/latex-lab/testfiles-OR/footnote-par.tlg
index 2ce3a569..9c0855bd 100644
--- a/required/latex-lab/testfiles-OR/footnote-par.tlg
+++ b/required/latex-lab/testfiles-OR/footnote-par.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles-OR/tagging-001.tlg b/required/latex-lab/testfiles-OR/tagging-001.tlg
index dc61538b..79877d6b 100644
--- a/required/latex-lab/testfiles-OR/tagging-001.tlg
+++ b/required/latex-lab/testfiles-OR/tagging-001.tlg
@@ -16,12 +16,12 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 Socket @footnotetext/process:
     number of arguments = 1
-    available plugs = noop, default, side, mp
+    available plugs = noop, identity, default, side, mp
     current plug = default
     definition = \protected\long macro:#1->\insert \footins {#1}
 Socket @footnotetext/make:
     number of arguments = 1
-    available plugs = noop, default, para
+    available plugs = noop, identity, default, para
     current plug = default
     definition = \protected\long macro:#1->\@makefntext {#1}
 Socket @footnotetext/begin:
@@ -41,8 +41,8 @@ Socket @makefntext/mark:
     definition = \protected\long macro:->\ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \ifdim \footnotemargin =-\maxdimen \@makefnmark \else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi 
 Socket @makefntext/text:
     number of arguments = 1
-    available plugs = noop, default
-    current plug = default
+    available plugs = noop, identity
+    current plug = identity
     definition = \protected\long macro:#1->#1
 -> The hook 'fntext/before':
 > The hook is empty.
diff --git a/required/latex-lab/testfiles/socket-000.lvt b/required/latex-lab/testfiles/socket-000.lvt
new file mode 100644
index 00000000..2475def0
--- /dev/null
+++ b/required/latex-lab/testfiles/socket-000.lvt
@@ -0,0 +1,57 @@
+\RequirePackage[enable-debug ,check-declarations]{expl3}
+\ExplSyntaxOn
+\debug_on:n { deprecation }
+\ExplSyntaxOff
+
+\DocumentMetadata{testphase=phase-III}
+
+\documentclass{article}
+
+\input{regression-test}
+
+
+\START
+
+\NewSocket{foo0}{0}
+\NewSocket{foo1}{1}
+\NewSocket{foo2}{2}
+\NewSocket{foo3}{3}
+
+\ShowSocket {foo0}
+\ShowSocket {foo1}
+\ShowSocket {foo2}
+\ShowSocket {foo3}
+
+\UseSocket{foo0}
+\UseSocket{foo1}{ \typeout{AAA} \count1 = 99 }
+\typeout { \the\count1 = 99 ? }
+
+\UseSocket{foo2}{ \typeout{AAA} }{ \typeout{BBB}  \count1 = 88 } 
+\typeout { \the\count1 = 88 ? }
+
+\UseSocket{foo3}{ \typeout{AAA} }{ \typeout{BBB} }{ \typeout{CCC} }
+
+\typeout{----------------------}
+
+\ExplSyntaxOn
+
+\socket_new:nn{bar0}{0}
+\socket_new:nn{bar1}{1}
+\socket_new:nn{bar2}{2}
+\socket_new:nn{bar3}{3}
+
+\socket_log:n {bar0}
+\socket_log:n {bar1}
+\socket_log:n {bar2}
+\socket_log:n {bar3}
+
+\socket_use:n{bar0}
+\socket_use:n{bar1}{ \typeout{AAA} \count1 = 99 }
+\typeout { \the\count1 = 99 ? }
+
+\socket_use:n{bar2}{ \typeout{AAA} }{ \typeout{BBB}  \count1 = 88 } 
+\typeout { \the\count1 = 88 ? }
+
+\socket_use:n{bar3}{ \typeout{AAA} }{ \typeout{BBB} }{ \typeout{CCC} }
+
+\END
diff --git a/required/latex-lab/testfiles/socket-000.tlg b/required/latex-lab/testfiles/socket-000.tlg
new file mode 100644
index 00000000..d1487df9
--- /dev/null
+++ b/required/latex-lab/testfiles/socket-000.tlg
@@ -0,0 +1,68 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Socket foo0:
+    number of arguments = 0
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:->
+! .
+\ShowSocket #1->\socket_log:n {#1}\errmessage {}
+l. ...\ShowSocket {foo0}
+This error message was generated by an \errmessage
+command, so I can't give any explicit help.
+Pretend that you're Hercule Poirot: Examine all clues,
+and deduce the truth by order and method.
+Socket foo1:
+    number of arguments = 1
+    available plugs = noop, identity
+    current plug = identity
+    definition = \protected\long macro:#1->#1
+! .
+\ShowSocket #1->\socket_log:n {#1}\errmessage {}
+l. ...\ShowSocket {foo1}
+(That was another \errmessage.)
+Socket foo2:
+    number of arguments = 2
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:#1#2->
+! .
+\ShowSocket #1->\socket_log:n {#1}\errmessage {}
+l. ...\ShowSocket {foo2}
+(That was another \errmessage.)
+Socket foo3:
+    number of arguments = 3
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:#1#2#3->
+! .
+\ShowSocket #1->\socket_log:n {#1}\errmessage {}
+l. ...\ShowSocket {foo3}
+(That was another \errmessage.)
+AAA
+ 99= 99 ? 
+ 99= 88 ? 
+----------------------
+Socket bar0:
+    number of arguments = 0
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:->
+Socket bar1:
+    number of arguments = 1
+    available plugs = noop, identity
+    current plug = identity
+    definition = \protected\long macro:#1->#1
+Socket bar2:
+    number of arguments = 2
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:#1#2->
+Socket bar3:
+    number of arguments = 3
+    available plugs = noop
+    current plug = noop
+    definition = \protected\long macro:#1#2#3->
+AAA
+99=99?
+99=88?
diff --git a/required/latex-lab/testfiles/socket-001.lvt b/required/latex-lab/testfiles/socket-001.lvt
new file mode 100644
index 00000000..aaaedb06
--- /dev/null
+++ b/required/latex-lab/testfiles/socket-001.lvt
@@ -0,0 +1,47 @@
+\DocumentMetadata{testphase=phase-III}
+
+\documentclass{article}
+
+\input{regression-test}
+
+
+\START
+
+{ \NewSocket{foo}{0}  } % fail
+
+\NewSocket{foo}{0}      % success
+
+\NewSocket{foo}{0}      % fail
+
+\AssignSocketPlug{foo}{undefined} %fail
+
+\NewSocketPlug{foo}{default}{\typeout{A socket plug}}
+
+\NewSocketPlug{foo}{default}{\typeout{A socket plug redefined}} % fail
+
+\ExplSyntaxOn
+\socket_set_plug:nnn{foo}{noop}{\typeout{modified~ noop}} %success
+\ExplSyntaxOff
+
+\typeout{----------------------}
+\ShowSocket {foo}
+
+\AssignSocketPlug{foo}{default} %success
+
+\typeout{----------------------}
+\UseSocket{foo}
+
+\begingroup
+\AssignSocketPlug{foo}{noop}  %success
+\typeout{----------------------}
+\UseSocket{foo}
+\endgroup
+
+\typeout{----------------------}
+\UseSocket{foo}
+
+
+\typeout{----------------------}
+
+
+\END
diff --git a/required/latex-lab/testfiles/socket-001.tlg b/required/latex-lab/testfiles/socket-001.tlg
new file mode 100644
index 00000000..0214816a
--- /dev/null
+++ b/required/latex-lab/testfiles/socket-001.tlg
@@ -0,0 +1,42 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+! Sockets can only be declared at top-level!.
+<argument> ... can only be declared at top-level!}
+l. ...{ \NewSocket{foo}{0}
+                           } % fail
+This error message was generated by an \errmessage
+command, so I can't give any explicit help.
+Pretend that you're Hercule Poirot: Examine all clues,
+and deduce the truth by order and method.
+! Socket 'foo' already declared!.
+<argument> ...age {Socket 'foo' already declared!}
+l. ...\NewSocket{foo}{0}
+                             % fail
+(That was another \errmessage.)
+! Plug 'undefined' for the socket 'foo' undeclared!.
+<argument> ...d' for the socket 'foo' undeclared!}
+l. ...\AssignSocketPlug{foo}{undefined}
+                                       %fail
+(That was another \errmessage.)
+! Plug 'default' for socket 'foo' already declared!.
+<argument> ... for socket 'foo' already declared!}
+l. ......efault}{\typeout{A socket plug redefined}}
+                                                   % fail
+(That was another \errmessage.)
+----------------------
+Socket foo:
+    number of arguments = 0
+    available plugs = noop, default
+    current plug = noop
+    definition = \protected\long macro:->\typeout {modified noop}
+! .
+\ShowSocket #1->\socket_log:n {#1}\errmessage {}
+l. ...\ShowSocket {foo}
+(That was another \errmessage.)
+----------------------
+A socket plug
+----------------------
+modified noop
+----------------------
+A socket plug
+----------------------





More information about the latex3-commits mailing list.