[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: changed test to use a file that is actually in the texmf tree (which is very small) move the tet files so that they are run only once (942ddc8d)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Aug 13 23:13:01 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/942ddc8da7081759809ebd966db44d35ec0195df

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

commit 942ddc8da7081759809ebd966db44d35ec0195df
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Aug 13 23:13:01 2020 +0200

    changed test to use a file that is actually in the texmf tree (which is very small)
    move the tet files so that they are run only once


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

942ddc8da7081759809ebd966db44d35ec0195df
 .../github-0220.luatex.tlg                         | 23 ++++++++++----------
 base/{testfiles => testfiles-1run}/github-0220.lvt | 25 +++++++++++++---------
 base/{testfiles => testfiles-1run}/github-0220.tlg | 22 +++++++++----------
 texmf/tex/latex/github-0220.sty                    |  1 +
 4 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/base/testfiles/github-0220.luatex.tlg b/base/testfiles-1run/github-0220.luatex.tlg
similarity index 59%
rename from base/testfiles/github-0220.luatex.tlg
rename to base/testfiles-1run/github-0220.luatex.tlg
index ebce203a..c8a5190d 100644
--- a/base/testfiles/github-0220.luatex.tlg
+++ b/base/testfiles-1run/github-0220.luatex.tlg
@@ -10,26 +10,25 @@ This is from file ``github 220 input''.
 Writing a file with the same name again, should fail:
 LaTeX Warning: File `github 220 input' already exists on the system.
                Not generating it from this source.
-Reading the fie ``github 220 input.tex'' (same result)
+Reading the file ``github 220 input.tex'' (same result)
 ("./github 220 input.tex"
 This is from file ``github 220 input''.
 )
 Forcing to writing a file with the same name, should succeed:
 LaTeX Warning: Writing or overwriting file `./github 220 input'.
 \openout127 = github 220 input.tex
-Reading the fie ``github 220 input.tex'' (different result)
+Reading the file ``github 220 input.tex'' (different result)
 ("./github 220 input.tex"
 This is from the third file ``github 220 input''.
 )
-Writing a file called ``h.tex'', should fail:
-LaTeX Warning: File `h.tex' already exists on the system.
+Writing a file called ``github-0220.sty'', should fail:
+github-0220.sty found
+LaTeX Warning: File `github-0220.sty' already exists on the system.
                Not generating it from this source.
-(h.tex
-This should be from a file called ``h.tex''
-)
-Writing a file called ``h.tex'' while only looking in the current dir, should succeed:
-LaTeX Warning: File `./h.tex' already in current directory.
-               Not generating it from this source.
-(h.tex
-This should be from a file called ``h.tex''
+./github-0220.sty not found
+Writing a file called ``github-0220.sty'' while only looking in the current dir, should succeed:
+LaTeX Warning: Writing file `././github-0220.sty'.
+\openout127 = ./github-0220.sty
+(github-0220.sty
+This should be from a file called ``github-0220.sty'' (second attempt)
 ) (github-0220.aux)
diff --git a/base/testfiles/github-0220.lvt b/base/testfiles-1run/github-0220.lvt
similarity index 67%
rename from base/testfiles/github-0220.lvt
rename to base/testfiles-1run/github-0220.lvt
index 5790a56f..9289a145 100644
--- a/base/testfiles/github-0220.lvt
+++ b/base/testfiles-1run/github-0220.lvt
@@ -36,7 +36,7 @@
 \begin{filecontents}{github 220 input}
   \typeout{This is from the second file ``github 220 input''.}
 \end{filecontents}
-\typeout{Reading the fie ``github 220 input.tex'' (same result)}
+\typeout{Reading the file ``github 220 input.tex'' (same result)}
 \input{github 220 input}
 
 % unless forced:
@@ -45,25 +45,30 @@
 \begin{filecontents}[overwrite]{github 220 input}
   \typeout{This is from the third file ``github 220 input''.}
 \end{filecontents}
-\typeout{Reading the fie ``github 220 input.tex'' (different result)}
+\typeout{Reading the file ``github 220 input.tex'' (different result)}
 \input{github 220 input}
 
 % Now try it for a file that exists somewhere in the texmf search
 % tree:
 
-\typeout{Writing a file called ``h.tex'', should fail:}
-\begin{filecontents}{h.tex}
- \typeout{This should be from a file called ``h.tex''}
+\typeout{Writing a file called ``github-0220.sty'', should fail:}
+
+\IfFileExists{github-0220.sty}{\typeout{github-0220.sty found}}{\typeout{github-0220.sty not found}}
+
+\begin{filecontents}{github-0220.sty}
+ \typeout{This should be from a file called ``github-0220.sty'' (first attempt)}
 \end{filecontents}
-\input{h.tex}
 
+\InputIfFileExists{./github-0220.sty}{}{\typeout{./github-0220.sty not found}}
 
-\typeout{Writing a file called ``h.tex'' while only looking in
+
+\typeout{Writing a file called ``github-0220.sty'' while only looking in
   the current dir, should succeed:}
 
-\begin{filecontents}[nosearch,noheader]{h.tex}
- \typeout{This should be from a file called ``h.tex''}
+\begin{filecontents}[nosearch,noheader]{github-0220.sty}
+ \typeout{This should be from a file called ``github-0220.sty'' (second attempt)}
 \end{filecontents}
-\input{h.tex}
+
+\InputIfFileExists{./github-0220.sty}{}{\typeout{./github-0220.sty not found}}
 
 \end{document}
diff --git a/base/testfiles/github-0220.tlg b/base/testfiles-1run/github-0220.tlg
similarity index 59%
rename from base/testfiles/github-0220.tlg
rename to base/testfiles-1run/github-0220.tlg
index b1f90e19..e7c1fcc4 100644
--- a/base/testfiles/github-0220.tlg
+++ b/base/testfiles-1run/github-0220.tlg
@@ -10,25 +10,23 @@ This is from file ``github 220 input''.
 Writing a file with the same name again, should fail:
 LaTeX Warning: File `github 220 input' already exists on the system.
                Not generating it from this source.
-Reading the fie ``github 220 input.tex'' (same result)
+Reading the file ``github 220 input.tex'' (same result)
 (github 220 input.tex
 This is from file ``github 220 input''.
 )
 Forcing to writing a file with the same name, should succeed:
 LaTeX Warning: Writing or overwriting file `./github 220 input'.
-Reading the fie ``github 220 input.tex'' (different result)
+Reading the file ``github 220 input.tex'' (different result)
 (github 220 input.tex
 This is from the third file ``github 220 input''.
 )
-Writing a file called ``h.tex'', should fail:
-LaTeX Warning: File `h.tex' already exists on the system.
+Writing a file called ``github-0220.sty'', should fail:
+github-0220.sty found
+LaTeX Warning: File `github-0220.sty' already exists on the system.
                Not generating it from this source.
-(h.tex
-This should be from a file called ``h.tex''
-)
-Writing a file called ``h.tex'' while only looking in the current dir, should succeed:
-LaTeX Warning: File `./h.tex' already in current directory.
-               Not generating it from this source.
-(h.tex
-This should be from a file called ``h.tex''
+./github-0220.sty not found
+Writing a file called ``github-0220.sty'' while only looking in the current dir, should succeed:
+LaTeX Warning: Writing file `././github-0220.sty'.
+(github-0220.sty
+This should be from a file called ``github-0220.sty'' (second attempt)
 ) (github-0220.aux)
diff --git a/texmf/tex/latex/github-0220.sty b/texmf/tex/latex/github-0220.sty
new file mode 100644
index 00000000..31edde4e
--- /dev/null
+++ b/texmf/tex/latex/github-0220.sty
@@ -0,0 +1 @@
+% test file for gh 220





More information about the latex3-commits mailing list.