[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh422: Add test file (533169d8)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Nov 6 03:30:34 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh422
Link       : https://github.com/latex3/latex2e/commit/533169d8db8473bcfb2eafc4d790dc26b121f514

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

commit 533169d8db8473bcfb2eafc4d790dc26b121f514
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Nov 5 23:30:34 2020 -0300

    Add test file


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

533169d8db8473bcfb2eafc4d790dc26b121f514
 base/testfiles/github-0422.lvt | 109 +++++++++++++++++++++++++++++++++
 base/testfiles/github-0422.tlg | 135 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 244 insertions(+)

diff --git a/base/testfiles/github-0422.lvt b/base/testfiles/github-0422.lvt
new file mode 100644
index 00000000..bfb647e7
--- /dev/null
+++ b/base/testfiles/github-0422.lvt
@@ -0,0 +1,109 @@
+\RequirePackage{expl3} % force backend loading
+\ExplSyntaxOn
+\makeatletter
+\str_gremove_once:Nn \@filelist { ,l3backend-dvips.def }
+\str_gremove_once:Nn \@filelist { ,l3backend-xetex.def }
+\ExplSyntaxOff
+
+\input{test2e}
+
+\def\lazypackage#1{%
+\ProvidesPackage{#1}
+\DeclareOption{opt}{\typeout{(#1) with 'opt'}}%
+\DeclareOption{opttwo}{\typeout{(#1) THIS SHOULD OPTION-CLASH!}}%
+\ProcessOptions\relax}
+
+\begin{filecontents}[overwrite]{testpath/teststy.sty}
+\lazypackage{teststy}%
+\end{filecontents}
+\begin{filecontents}[overwrite]{teststy.sty}
+\lazypackage{teststy}%
+\end{filecontents}
+
+\begin{filecontents}[overwrite]{test-broken.sty}
+\lazypackage{test-broken}%
+\errmessage{(test): I SHOULD NOT BE LOADED!}
+\end{filecontents}
+\begin{filecontents}[overwrite]{test-fixed.sty}
+\lazypackage{test-fixed}%
+\typeout{(test): I should be loaded instead.}
+\ifdefined\testloaded \errmessage{(test): BUT NOT TWICE!}\fi
+\def\testloaded{yes}
+\end{filecontents}
+
+\begin{filecontents}[overwrite]{testpath/in-broken.sty}
+\lazypackage{in-broken}%
+\errmessage{(inpath): I SHOULD NOT BE LOADED!}
+\end{filecontents}
+\begin{filecontents}[overwrite]{testpath/in-fixed.sty}
+\lazypackage{in-fixed}%
+\typeout{(inpath): I should be loaded instead.}
+\ifdefined\inpathloaded \errmessage{(inpath): BUT NOT TWICE!}\fi
+\def\inpathloaded{yes}
+\end{filecontents}
+
+\begin{filecontents}[overwrite]{testpath/inputpath-broken.sty}
+\lazypackage{inputpath-broken}%
+\errmessage{(inputpath): I SHOULD NOT BE LOADED!}
+\end{filecontents}
+\begin{filecontents}[overwrite]{testpath/inputpath-fixed.sty}
+\lazypackage{inputpath-fixed}%
+\typeout{(inputpath): I should be loaded instead.}
+\ifdefined\inputpathloaded \errmessage{(inputpath): BUT NOT TWICE!}\fi
+\def\inputpathloaded{yes}
+\end{filecontents}
+
+\makeatletter
+\declare at file@substitution{test-broken.sty}{test-fixed.sty}
+\declare at file@substitution{in-broken.sty}{in-fixed.sty}
+\declare at file@substitution{inputpath-broken.sty}{inputpath-fixed.sty}
+\makeatother
+
+\listfiles
+
+\documentclass{article}
+
+\START
+
+\typeout{==================================================}
+
+\usepackage[opt]{testpath/teststy}
+\usepackage{teststy} % Don't load
+\usepackage{testpath/teststy} % Don't load
+\usepackage[opttwo]{teststy}\relax % Option clash
+\usepackage[opttwo]{testpath/teststy}\relax % Option clash
+
+\typeout{==================================================}
+
+\usepackage[opt]{test-broken}
+\usepackage{test-broken} % Don't load
+\usepackage{test-fixed} % Don't load
+\usepackage[opttwo]{test-broken}\relax % Option clash
+\usepackage[opttwo]{test-fixed}\relax % Option clash
+
+\typeout{==================================================}
+
+\usepackage[opt]{testpath/in-fixed}
+% \usepackage{testpath/in-broken} % Doesn't find the file due to substitution
+\usepackage{testpath/in-fixed} % Don't load
+% \usepackage[opttwo]{testpath/in-broken}\relax % Doesn't find the file due to substitution
+\usepackage[opttwo]{testpath/in-fixed}\relax % Option clash
+
+\typeout{==================================================}
+
+\makeatletter
+\def\input at path{{./testpath/}}
+
+\usepackage[opt]{inputpath-broken}
+\usepackage{inputpath-broken} % Don't load
+\usepackage{inputpath-fixed} % Don't load
+\usepackage[opttwo]{inputpath-broken}\relax % Option clash
+\usepackage[opttwo]{inputpath-fixed}\relax % Option clash
+
+\typeout{==================================================}
+
+\OMIT
+\begin{document}
+\TIMO
+
+\end{document}
diff --git a/base/testfiles/github-0422.tlg b/base/testfiles/github-0422.tlg
new file mode 100644
index 00000000..af676b3a
--- /dev/null
+++ b/base/testfiles/github-0422.tlg
@@ -0,0 +1,135 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+==================================================
+(testpath/teststy.sty
+Package: teststy 
+(teststy) with 'opt'
+)
+! LaTeX Error: Option clash for package teststy.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{teststy}\relax
+                                        % Option clash
+The package teststy has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+! LaTeX Error: Option clash for package teststy.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{testpath/teststy}\relax
+                                                 % Option clash
+The package teststy has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+==================================================
+(test-fixed.sty
+Package: test-fixed 
+(test-fixed) with 'opt'
+(test): I should be loaded instead.
+)
+! LaTeX Error: Option clash for package test-fixed.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{test-broken}\relax
+                                            % Option clash
+The package test-fixed has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+! LaTeX Error: Option clash for package test-fixed.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{test-fixed}\relax
+                                           % Option clash
+The package test-fixed has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+==================================================
+(testpath/in-fixed.sty
+Package: in-fixed 
+(in-fixed) with 'opt'
+(inpath): I should be loaded instead.
+)
+! LaTeX Error: Option clash for package in-fixed.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{testpath/in-fixed}\relax
+                                                  % Option clash
+The package in-fixed has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+==================================================
+(testpath//inputpath-fixed.sty
+Package: inputpath-fixed 
+(inputpath-fixed) with 'opt'
+(inputpath): I should be loaded instead.
+)
+! LaTeX Error: Option clash for package inputpath-fixed.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{inputpath-broken}\relax
+                                                  % Option clash
+The package inputpath-fixed has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+! LaTeX Error: Option clash for package inputpath-fixed.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\usepackage[opttwo]{inputpath-fixed}\relax
+                                                 % Option clash
+The package inputpath-fixed has already been loaded with options:
+  [opt]
+There has now been an attempt to load it with options
+  [opttwo]
+Adding the global options:
+  opt,opttwo
+to your \documentclass declaration may fix this.
+Try typing  <return>  to proceed.
+==================================================
+(github-0422.aux)
+ *File List*
+   expl3.sty    ....-..-.. L3 programming layer (loader) 
+  test2e.tex
+ article.cls    ....-..-.. v... Standard LaTeX document class
+  size10.clo    ....-..-.. v... Standard LaTeX file (size option)
+testpath/teststy.sty    
+test-fixed.sty    
+testpath/in-fixed.sty    
+./testpath//inputpath-fixed.sty    
+ ***********





More information about the latex3-commits mailing list.