[latex3-commits] [git/LaTeX3-latex3-latex2e] gh386: Add test file showing the wrong behaviour (52a35a98)

PhelypeOleinik phelype.oleinik at latex-project.org
Mon Sep 7 02:10:42 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh386
Link       : https://github.com/latex3/latex2e/commit/52a35a989cfe7589bb79096dff1a5903f6f07634

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

commit 52a35a989cfe7589bb79096dff1a5903f6f07634
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sun Sep 6 21:10:42 2020 -0300

    Add test file showing the wrong behaviour


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

52a35a989cfe7589bb79096dff1a5903f6f07634
 base/testfiles/github-0386.lvt | 52 ++++++++++++++++++++++++++++++++++++++++++
 base/testfiles/github-0386.tlg | 22 ++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/base/testfiles/github-0386.lvt b/base/testfiles/github-0386.lvt
new file mode 100644
index 00000000..ac31d2ef
--- /dev/null
+++ b/base/testfiles/github-0386.lvt
@@ -0,0 +1,52 @@
+
+\begin{filecontents}[overwrite]{pkg-fixed.sty}
+
+\typeout{==========================
+      ^^J at ifpackagewith{pkg-fixed}:
+      ^^J--------------------------}
+
+\@ifpackagewith{pkg-fixed}{global}{\typeout{Global option}}%
+  {\typeout{Global options aren't picked up by \string\@ifpackagewith}}
+\@ifpackagewith{pkg-fixed}{passoption}{\typeout{Option in \string\PassOptionsToPackage}}{}
+\@ifpackagewith{pkg-fixed}{usepackage}{\typeout{Option in \string\usepackage}}{}
+\@ifpackagewith{pkg-fixed}{redirect}{\typeout{Redirected option}}{}
+
+\typeout{===================
+      ^^J at ifpackagewith{pkg} (replaced file doesn't see any option):
+      ^^J-------------------}
+
+\@ifpackagewith{pkg}{global}{\typeout{Global option}}{}
+\@ifpackagewith{pkg}{passoption}{\typeout{Option in \string\PassOptionsToPackage}}{}
+\@ifpackagewith{pkg}{usepackage}{\typeout{Option in \string\usepackage}}{}
+\@ifpackagewith{pkg}{redirect}{\typeout{Redirected option}}{}
+
+\typeout{===============
+      ^^JProcessOptions:
+      ^^J---------------}
+
+\DeclareOption{global}{\typeout{Global option}}
+\DeclareOption{passoption}{\typeout{Option in \string\PassOptionsToPackage}}
+\DeclareOption{usepackage}{\typeout{Option in \string\usepackage}}
+\DeclareOption{redirect}{\typeout{Redirected option}}
+
+\ProcessOptions
+
+\end{filecontents}
+
+\makeatletter
+\declare at file@substitution{pkg.sty}{pkg-fixed.sty}
+\makeatletter
+
+\input{test2e}
+\START
+
+% Avoid additional tlg file for LuaTeX
+\AddToHook{file/before/size10.clo}{\OMIT}
+\documentclass[global]{article}
+\TIMO
+
+\PassOptionsToPackage{redirect}{pkg}
+\PassOptionsToPackage{passoption}{pkg-fixed}
+\usepackage[usepackage]{pkg}
+
+\END
diff --git a/base/testfiles/github-0386.tlg b/base/testfiles/github-0386.tlg
new file mode 100644
index 00000000..51b3a1de
--- /dev/null
+++ b/base/testfiles/github-0386.tlg
@@ -0,0 +1,22 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+(article.cls
+Document Class: article ....-..-.. v... Standard LaTeX document class
+(pkg-fixed.sty
+========================== 
+ at ifpackagewith{pkg-fixed}: 
+--------------------------
+Global options aren't picked up by \@ifpackagewith
+Option in \PassOptionsToPackage
+=================== 
+ at ifpackagewith{pkg} (replaced file doesn't see any option): 
+-------------------
+Option in \usepackage
+Redirected option
+=============== 
+ProcessOptions: 
+---------------
+Global option
+Option in \usepackage
+Redirected option
+)





More information about the latex3-commits mailing list.